Help Please - DateAdd Function

graviz

Registered User.
Local time
Today, 09:59
Joined
Aug 4, 2009
Messages
167
I have a query with 5 fields:

Month (The criteria is based upon a combobox on a form): i.e Feb
Start Date: First day of the month on the month selected: i.e 2/1/10
End Date: Last day of the month on the month selected: i.e. 2/28/10

These two dates I wanted to calculate the start and end dates of the previous month selected: i.e. Jan
New_SD: New_SD: DateAdd("m",-1,[Start_Date])
New_ED: New_ED: DateAdd("m",-1,[End_Date])

I thought I had it figured out but as you could see this will not work for the end date as Jan has 31 days and not 28. Can I modify my formula somehow to do this?
 

Users who are viewing this thread

Back
Top Bottom