date problem

  • Thread starter Thread starter Jeff Hughes
  • Start date Start date
J

Jeff Hughes

Is there a way for access to automatically work out the 1st and last day of
the previous month without having to manually do anything and then use this
info to run queries etc???

thanks
 
Last day of last month is:
Date() - Day(Date())

First of last month is:
DateAdd("m", -1, Date() - Day(Date()) + 1)
 
Is there a way for access to automatically work out the 1st and last day of
the previous month without having to manually do anything and then use this
info to run queries etc???

DateSerial(Year(Date()), Month(Date()) - 1, 1)
DateSerial(Year(Date()), Month(Date()), 0)

respectively
 

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

Back
Top