Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dateadd Problem

Status
Not open for further replies.

jamespeters01

IS-IT--Management
Apr 3, 2001
75
GB
Is there a complete opposite to the Dateadd function??

I want my query to show the last 13 weeks activity as of the date specified by the user.


Any help would be appreciated

Cheers
 
Just make the number you add to the date negative. For example:
[tt]
DateAdd('d',-13,YourDateParameter)
[/tt]
 
Thanks.

To enable it to show every return for my criteria, I used this formula.... Between Now() And DateAdd("ww",-2,[Enter Todays Date])

This work fine, but I would now like to group the two weeks worth of returns into just 2 figures...i.e Wk1 & Wk2

Any further ideas ?


Cheers
 
I would add a new, calculated field to the query and group on it. For example, Format(YourDateField,"ww") will give you the week number for the week. When you group the summary on this field, you will get a summary by week.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top