Date Calculation

LadyDi

Registered User.
Local time
Today, 12:28
Joined
Mar 29, 2007
Messages
894
Is there a way to take today's date and calculate the last day of the last month? Without the user needing to enter any parameters. In other words, if I ran the query today with this criteria, it would only show information for April 30, 2013. Is that possible?
 
A trick is that the last day of one month is the 0'th of next month. Try:

DateSerial(Year(Date()), Month(Date()), 0)
 
That worked perfectly. Thank you very much for your assistance.
 

Users who are viewing this thread

Back
Top Bottom