Get dates based on the day

minii

Registered User.
Local time
Today, 13:56
Joined
Nov 8, 2010
Messages
26
Hi,

So what I'm looking at doing is getting dates for the current weeks Monday and Saturday. I think what I'd need to do is look at todays date say that came back as Thursday 19/1/2012, I then would want it to get me Monday's date and Saturday's date and put them in the necessary field for each. I assume VBA would be the best way to do this. Sorry if I didn't explain it well.

Many thanks.
 
without checking the functions above, i tend to just do this sort of thing. Maybe a handful of extra clock cycles, but immaterial in programme execution time, I would think.

so for a saturday (say)

while weekday(checkdate)<>vbsaturday
checkdate=checkdate-1
wend
 
Hi -

Assuming you are working with Sunday = 1 thru Saturday = 7
For Monday of Current Week:
? date() - weekday(date())+ 2
1/23/2012

For Saturday of Current Week:
? date() - weekday(date())+ 7
1/28/2012

HTH - Bob
 

Users who are viewing this thread

Back
Top Bottom