|
|

Getting the date for a specified day of the week from a given date
If you wish to get the Tuesday of the week for a given date, then you can use a function such as this:
Function fDayOfWeek(dtmDateIn As Date, intWeekDay As Integer) As Date
fDayOfWeek = IIf(intWeekDay >= WeekDay(dtmDateIn, vbSunday), dtmDateIn + (WeekDay(dtmDateIn, vbSunday) - intWeekDay), dtmDateIn - WeekDay(dtmDateIn, vbSunday) + intWeekDay)
End Function
|
And then call the function like this:
|
dtmTuesday=fDayOfWeek(Date,vbTuesday)
|
Top
HOME |
NEW |
TABLES |
QUERIES |
FORMS |
REPORTS |
GENERAL |
API |
DOWNLOADS |
TUTORIAL |
RESOURCES
E-MAIL
Copyright & Disclaimer
|
| |