dates question

J

Jack

Need to pull data for a time period. How can I have the
query start from the first day of a month?

i.e. tried in query but results are only from April 30 to
August 31 -> Needed April 1 to August 31

Between DateAdd("m",-4,DateSerial(Year(Date()),Month(Date
()),0)) And DateSerial(Year(Date()),Month(Date()),0)

Any any ideas?

Between DateAdd("m",-4,??) And DateSerial(Year(Date
()),Month(Date()),0)
 
T

Tim Carley

Month([yourdatefield]) = Month(Date()) AND Year([yourdatefield]) =
Year(Date())
hth,
Tim
 
B

Brian Camire

If you want the last five calendar months ending in the last calendar month
(which seems to be what you're asking), you might try criteria something
like this:
=DateSerial(Year(Date()),Month(Date())-5,1) And
<DateSerial(Year(Date()),Month(Date()),1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top