Date Expression?

pianoprodigy

Registered User.
Local time
Today, 07:06
Joined
Apr 22, 2003
Messages
42
I need to make the query collect all of records dated one month previous from when the query will be run.

For instance, sometime in February of 2004 the query will be run and return all of the records from January of 2004.

I think this should be easy, but I can't get the syntax right.

Thanks,

Alan
 
Between DateSerial(Year(DateAdd("m",-1,Date())),Month(DateAdd("m",-1,Date())),1) And DateSerial(Year(Date()),Month(Date()),1)-1
 
Thanks a lot!
 
Try

Between DateSerial(Year(Date()),Month(Date())-1,1) And DateSerial(Year(Date()),Month(Date()),0)

David
 
DJN said:
DateSerial(Year(Date()),Month(Date())-1,1)

What happens in January? There's no such month as 0. And the year doesn't change...
 
Mile-O-Phile said:


What happens in January?

I usually get a big sod-off credit card bill and this year was no exception :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom