Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display month name and year in title 1

Status
Not open for further replies.

moopenguin32

Technical User
Dec 23, 2008
20
0
0
US
I have a report that is pulling data using LastFullMonth. In the title of the report, I would like to display the month and year the report is for.

For example, if I run the report in February, I would like the title to display "January 2009." Likewise, if I run the report in January, I would like it to display "December 2008."

Currently, I know how to make it show just the month by using the following formula:

Code:
monthname(month(DateAdd ("m", -1, DataDate)))

Thank you for your assistance.

"Remember, today is the tomorrow you worried about yesterday." - Dale Carnegie
 
You could use:

totext(minimum(lastfullmonth),"MMMM yyyy")

-LB
 
Worked like a charm. Thanks again for your help.

"Remember, today is the tomorrow you worried about yesterday." - Dale Carnegie
 
YOu can derive year in same way

year(DateAdd ("m", -1, DataDate))

if you need it in Text

totext(year(DateAdd ("m", -1, DataDate)), 0, "")

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top