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
 
Back
Top