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

Previous Year to Previous Year Date

Status
Not open for further replies.

TEM3

Technical User
Dec 6, 2004
324
US
({ALL_ASSIGNMENTS.Date Assigned} in date(year(currentdate),01, 01) to currentdate)

The above works fine for the current year's numbers. Now I want to run the same report for the previous year. How do I need to change the selection formula??
 
{ALL_ASSIGNMENTS.Date Assigned} in date(year(currentdate)-1,01, 01) to date(year(currentdate)-1,month(currentdate),day(currentdate))

-LB
 
You can also use the built in functions YearToDate and LastYearYTD:

This year:

{ALL_ASSIGNMENTS.Date Assigned} in YearToDate


Last Year:

{ALL_ASSIGNMENTS.Date Assigned} in LastYearYTD

~Brian
 
Thank you to both of you.

I keep being alerted to date functions in Crystal Reports that I had no idea of their existance.

Where can I find a list of data function available in CR 8.5. (I'd look in help, but after a couple install tries I still have not been able to get the Help files to install!).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top