By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,475 Members | 1,915 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,475 IT Pros & Developers. It's quick & easy.

Converting dates

P: 50
Hi guys

I have a report which auto groups my daily results into weeks by week number:

=Format$([OrderDate],"ww",0,0)

...Any ideas how I can introduce a column that would state 'Week Commencing Date' for each week???

Thanks in advance, OllyJ
Apr 29 '08 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 634
Hi guys

I have a report which auto groups my daily results into weeks by week number:

=Format$([OrderDate],"ww",0,0)

...Any ideas how I can introduce a column that would state 'Week Commencing Date' for each week???

Thanks in advance, OllyJ
Hi

Something like this
Expand|Select|Wrap|Line Numbers
  1. Dim YourDate As Date
  2.     YourDate = Date
  3.  
  4.     MsgBox "Week Commencing Monday " & YourDate - (Weekday(YourDate, vbMonday) - 1)
If you want week commencing on any other day just change vbMonday constant to suit.

??


MTB
Apr 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.