Find week start date and weekend date from current date

If I select current date as  26/Apr/2006 it will give me  week start date
As  23/Apr/2006 and weekend date as 29/Apr/2006
Similarly
If I select current date as  31/May/2006 it will give me  week start date
As  28/May/2006 and weekend date as 03/Jun/2006
RETAILREALMAsked:
Who is Participating?
 
TimCotteeHead of Software ServicesCommented:
Hi RETAILREALM,

StartDate= DateAdd("d", 1 - DatePart("w", Now), Now)
EndDate = DateAdd("d", 7 - DatePart("w", Now), Now)

Tim Cottee
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
http://www.w3schools.com/vbscript/func_datepart.asp

debug.print dateadd("d", 1-datepart("w", now), now)
debug.print dateadd("d", 8-datepart("w", now), now)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.