Home
> Crystal Reports > Last Day of Previous Year or First Day of Current Year Calculation in Crystal Reports
Last Day of Previous Year or First Day of Current Year Calculation in Crystal Reports
You have a requirement to use the last day of the previous year or the first day of the current year and you don’t want to be hard coding any values into the report.
Very simply.
For Last Day of Previous Year: Create a Formula @PrioYearEnd
date(Year(currentdate)-1,12,31)
For First Day of Current Year simply remove the -1 from current date;
date(Year(currentdate),01,01)
Categories: Crystal Reports
Crystal Reports, date function, formula
how do i get january first of prior year?
This will get you January First of Prior Year. I.e (1/1/2013)
date(Year(currentdate)-1,01,01)