• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

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
0
RETAILREALM
Asked:
RETAILREALM
1 Solution
 
TimCotteeCommented:
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now