Date of this monday (1 Viewer)

nine

Registered User.
Local time
Today, 00:30
Joined
Feb 15, 2006
Messages
24
How can I find out the date for whichever the date is of this monday. So, if today is 23/03/2006, then it would give 20/03/2006, which was the date of this monday.

Thanks for any advice.
 
Last edited:

gromit

Registered User.
Local time
Today, 00:30
Joined
Nov 17, 2005
Messages
260
Hi -

Not quite sure what you mean by "this" Monday, but...

This will give you the Monday before Date1

Date1 - (7 + DatePart("w", Date1) - vbMonday) Mod 7

And this will give you the next Monday after (unless the day is a Monday)

Date1 + (7 + vbMonday - DatePart("w", Date1 )) Mod 7


If you want the closest Monday, you can set up some IF/THEN by lookng at (vbMonday - DatePart("w",Date1) and deciding which of the two methods to use.

- g
 

nine

Registered User.
Local time
Today, 00:30
Joined
Feb 15, 2006
Messages
24
Thanks! The first one was what I wanted; the date of this week's monday.
 

Users who are viewing this thread

Top Bottom