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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return data for last 6 months

Status
Not open for further replies.

Brianfree

Programmer
Feb 6, 2008
220
GB
Hi, i have a table with parts information, qty and a date. I need to return data where the date is within the last 6 months. Also on another query return data for 6 - 12 months

Please can anyone reply with some sample code...

Many thanks,

Brian
 
If I were you I'd have a look at the DateAdd function. Something like:
Code:
WHERE YourDate >DateAdd("m",-6,Now())
Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top