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

Month to date and year to date problem.

Status
Not open for further replies.

tmunson99

MIS
Jun 18, 2004
62
US
I am trying to create a report that will calculate month to date and year to date. I need to be able to compute both for a given date. For example if the user indicates that the date is 10/11/2004, that is the date I want to compute month to date and year to date on for a set of currency values.
 
Try the following.

Assume that ?dateparm is a date parameter entered by the user.

//@YTD
{table.date} in date(year({?dateparm}),1,1) to {?dateparm}

//@MTD
{table.date} in date(year({?dateparm}),month({?dateparm}},1) to {?dateparm}

-LW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top