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)

 

 

  1. soni
    October 28, 2014 at 3:46 pm

    how do i get january first of prior year?

    • October 28, 2014 at 4:12 pm

      This will get you January First of Prior Year. I.e (1/1/2013)
      date(Year(currentdate)-1,01,01)

  1. No trackbacks yet.

Leave a comment