date fields

pwicr

Registered User.
Local time
, 22:42
Joined
Sep 22, 2011
Messages
144
I need to put a date field in that is the month and year of the reporting period...

for example

February 2013

and then another date field that is the 10th day of the month following the reporting period.

example: March 10, 2013

I have tried a number of different formats and can't get it right.
 
You can display a date by using FORMAT.

So, if you have something that gives the reporting period, if it is a date you can use

Format([DateFieldNameHere], "mmmm yyyy")
to get

February 2013

If you need the 10th day of the following month you can use

Format(DateSerial(Year([DateFieldHere]), Month([DateFieldHere], 10), "mmmm d, yyyy")

Hope that helps.
 
but if I'm generating my February report in March how do i get it to say february?
 
You can use

Format(DateAdd("d", -1, Date()), "mmmm yyyy")

Shouldn't the operator be " m"

And since there is obviously no datefield !! Then to get the 10th of the month the report is run in

Dateserial(year(date()) ,month(date()),10)

Brian
 

Users who are viewing this thread

Back
Top Bottom