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

week number

P: n/a
The following returns the week numbers perfectly:

Week Number: DateDiff("ww",DateAdd("ww",-20,[Intake Day]),[TheDate])
= 0,1,2,3, ...20
what I would like is to have :

-1, -2, -3 ...-20

I am not sure how to acheive this.

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
>Week Number: DateDiff("ww",DateAdd("ww",-20,[Intake Day]),[TheDate])

Try reversing the parameters in DateDiff
DateDiff("ww", [TheDate], DateAdd("ww", -20, [Intake Day]))

--
Wayne Morgan
Microsoft Access MVP
"Peter Bailey" <pe*********@andaluz.fsbusiness.co.uk> wrote in message
news:ch**********@news7.svr.pol.co.uk...
The following returns the week numbers perfectly:

Week Number: DateDiff("ww",DateAdd("ww",-20,[Intake Day]),[TheDate])
= 0,1,2,3, ...20
what I would like is to have :

-1, -2, -3 ...-20

I am not sure how to acheive this.

Nov 13 '05 #2

P: n/a
Wayne Morgan wrote:
Week Number: DateDiff("ww",DateAdd("ww",-20,[Intake Day]),[TheDate])

Try reversing the parameters in DateDiff
DateDiff("ww", [TheDate], DateAdd("ww", -20, [Intake Day]))


or *-1? :-)

--

\\\\\\
\\ \\ Windows is searching
\ \ For your sig.
\ \ Please Wait.
\__\

Nov 13 '05 #3

P: n/a
The solution turned out to be :
Week Number: DateDiff("ww",DateAdd("ww",1,[Intake Day]),[TheDate])

Thanks for the assistance anyway.
regards
Peter

"Trevor Best" <nospam@localhost> wrote in message
news:41***********************@auth.uk.news.easyne t.net...
Wayne Morgan wrote:
Week Number: DateDiff("ww",DateAdd("ww",-20,[Intake Day]),[TheDate])

Try reversing the parameters in DateDiff
DateDiff("ww", [TheDate], DateAdd("ww", -20, [Intake Day]))


or *-1? :-)

--

\\\\\\
\\ \\ Windows is searching
\ \ For your sig.
\ \ Please Wait.
\__\

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.