DateAdd for当前月份和星期几 [英] DateAdd for The current month and day of week

查看:121
本文介绍了DateAdd for当前月份和星期几的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道MS Access VBA代码才能生成一个DateAdd,以便在今天和一周的同一天给我一个月。

I need to know the MS Access VBA code to produce a DateAdd to give me one month from today and the same day of the week.

推荐答案

GDC1970,


请提供更多信息。你的意思是,例如,今天是10月17日,但它是本月的第三个星期五,所以,从现在开始的一个月是11月21日,因为这是本月的第三个星期五?

你如何处理特殊情况,例如一个月的第五个工作日而下个月没有相应的情况?


此外,这个问题的性质是什么,也是可能会帮助我们提供不同的解决方案或不同的选项,也可能满足您的需求....
GDC1970,

Please provide a little more information. Do you mean, for example, today is October 17, but it is the third Friday of the Month, so, one month from now would be November 21, as it is the third Friday of the month?

How do you handle special situations, such as a fifth weekday of one month with no corresponding next month?

Also, what is the nature of this question, which also might help us provide either different solutions or different options that also might suit your needs....


这正是我正在寻找的。没有特殊的例外。我正在安排治疗计划的活动,每个月的第3个月,每月一个月。
Thats exactly what im looking for. There would be no special exceptions. I am scheduling activities for a treatment program and they are monthly on the 3rd fri of month, every month.


或者如果我的开始日期是星期一,那个月的第二个星期一,我想要它将在一个月后的星期一第二个星期一添加。

所以我希望它使用开始日期信息来生成下个月和星期几
Or if my start date is a monday the 2nd monday of the month, I want it to add one month later on monday the 2nd monday of the month.
So I want it to use the start date info to produce the next month and day of week


这篇关于DateAdd for当前月份和星期几的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆