function to find the Monday preceding a date

  • Thread starter Thread starter UsenetUser
  • Start date Start date
U

UsenetUser

Hi,

Not sure if this is the best group to look, but the subject explains
what I need. can anybody point me to such a function?
 
Try this

DateAdd("d",1-Weekday(TheDate,vbMonday),TheDate)

IF you need to do that in a query you will have to replace vbMonday with 2,
since queries have no idea what the vba constants are.
DateAdd("d",1-Weekday(TheDate,2),TheDate)


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Thanks, John. I am sure it works!

Try this

DateAdd("d",1-Weekday(TheDate,vbMonday),TheDate)

IF you need to do that in a query you will have to replace vbMonday with 2,
since queries have no idea what the vba constants are.
DateAdd("d",1-Weekday(TheDate,2),TheDate)


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top