G
Guest
Hi.
I have a table with a date field in it, and I want to be able to pull out
all the records from the previous month, irrespective of when I run the
Query. So any time I run the query in May, I'll get all April records etc. It
seems simple!
I tried adding the SQL:
AND ((Format([EPIS_START],"M"))=Format(Date(),"M")-1))
which worked , but when i added:
AND ((Format([EPIS_START],"YY"))=Format(Date(),"YY"))
I get nothing even though there's definitely data there for this.
What am I doing wrong? Is there a neater way to do this?
I have a table with a date field in it, and I want to be able to pull out
all the records from the previous month, irrespective of when I run the
Query. So any time I run the query in May, I'll get all April records etc. It
seems simple!
I tried adding the SQL:
AND ((Format([EPIS_START],"M"))=Format(Date(),"M")-1))
which worked , but when i added:
AND ((Format([EPIS_START],"YY"))=Format(Date(),"YY"))
I get nothing even though there's definitely data there for this.
What am I doing wrong? Is there a neater way to do this?