Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date question

Status
Not open for further replies.

JINGRAM

Technical User
Mar 28, 2002
10
US
Hi I posted a question in another forum (don't know if I'm posting in the right forums)
anyway - I kind of figured out my last problem - I was wondering if you are using the DateAdd function if there is a way to return the criteria that you want by mondays?

My Date field is BDT
My new field is Projected Date

Projected Date:=DateAdd("w",-7,[BDT])

This returns exactly what I asked it -7 days but........can I also ask it if it's sat, or sun to return the monday date??

Thanks
JINGRAM
 
Try this:

DateAdd("w", ((WeekDay([BDT], vbMonday) - 1) * -1), [BDT])

Change the vbMonday to be the day of the week that you wish to locate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top