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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Parameters in Report Titles

Status
Not open for further replies.

sandora

Technical User
May 17, 2005
57
US
Ver11, AccessDB. I have a parameter called {?DateRange} which returns the beginning date of the report, which always falls on the first of a month and the ending day of the report which always falls on the first of a month. But this is for accountants and they want the title to say something like "report for 01/01/2005 to 02/28/05" How can I get the (maximum ({?DateRange}),"MM/dd/yy" to substract one day so that it shows the last day of the previous month?
 
A simple means to get the last day of a mointh is:

dateserial(year{date),month(date)+1,1)-1

replacing date with the month you want the last date for.

-k
 
Rather, replacing date with the date of the month you want the last date for.

Note that it adds a month returning the first day of the next month, and then subtracts a day.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top