1st day of a month

Skotor

Registered User.
Local time
Yesterday, 23:50
Joined
Jan 30, 2003
Messages
23
I have a query that looks at a closed date of a location and gives me a date 11 months prior or the open date, which ever is larger. My problem is from this point I want to find any sales from the first day of the 11th month back up until december 03. So say if a location closed on 3/20/04 it currently returns 4/20/03. I need it then to change that to the first day of that month. So I would then make a query that would find all sales between 4/1/03 and 12/31/03. This part I can do fine. My problem is making it list the first date of the month it returns. I've been unable to find a solution to this problem. Maybe my line of thinking for getting this data is flawed too, and if there is an easier way please point it out to me.

Note: not using VB / SQL code, making it right from the query design view. Can do some limited SQL if it's needed to make this work.

Thanks in advance!

Scott
 
Last edited:
Use an expression in your query to create the first day of the month from th source:

i.e.

NewField: DateSerial(Year([MyField]), Month([MyField]), 1)
 
Perfect! Thanks for the help.
 

Users who are viewing this thread

Back
Top Bottom