Coding first and last day of current month in Access

Experts,

Is there a way to code first day of current month and first day of next month in an SQL query in Access.  I want to do this so the query does not have to change and can be run automatically each month.
moriniaAdvanced Analytics AnalystAsked:
Who is Participating?
 
IrogSintaCommented:
Use the DateSerial Function.  Here are some examples:
FirstDayOfMonth: DateSerial(Year(Date()), Month(Date()), 1)
LastDayOfMonth: DateSerial(Year(Date()), Month(Date())+1, 0)
FirstDayOfNextMonth: DateSerial(Year(Date()), Month(Date())+1, 1)

Ron
0
 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
DateSerial(Year(Date()),Month(Date()),1)

DateSerial(Year(Date()),Month(Date())+1,1)

Jim.
0
 
hnasrCommented:
Check this link for displaying specific dates.
http://support.microsoft.com/kb/210604
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.