Month Function ?

M

MikeSr

I need to set my report start date for the begining of the month and the end
date to the end of the same month.
I was able to handle my daily report and weekly report just fine but I am
stuck on the method for handling the month and year as well.
The month period must start on the first day of the month and end on the
first day of the following month.
Any help would be appreciated.
 
J

Jeff Boyce

Take a look at the DateSerial() function in Access HELP.

For the first day of a month, you could use something like:

DateSerial(Year([YourDateField), Month([YourDateField], 1)

For the last day of a month, you could use something like:

DateSerial(Year(YourDateField), Month([YourDateField] + 1, 0)

(that is, the zero-th day of "next" month is the last day of this month).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Top