Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Topic: Leap Year Day and month Posted: 23 Sep 2016 at 8:56am
I'm working in Crystal 2011. I have a report designed to evaluate the day and month of the MASTER_ENTRY_DATE, look back 6 months (from month and day) and decide if that month and day falls between the month and day of the most recent full pay period. This also happens at the 1 year marker, by looking at the month, day, and year, and comparing to the month day and year of the pay period begin and end dates.
The problem: An employee's a MASTER_ENTRY_DATE falls on 2/29/2016. When the report attempts to come up with the 1 year date (2/29/2015) it does not exist and I receive an error. This could also happen if an employee has a 8/29/yyyy MASTER_ENTRY_DATE when it evaluates the 6 months, but no one has that date yet.
I'm trying to figure out a work-around to this issue. I'd like to construct a statement that says "if 6 month date = 2/29 of a non-leap year, then change date to 3/1 and recalculate, else, if 1 year date = 2/29 of a non-leap year, then change to 3/1 and recalculate.
Suggestions are welcome. Thank you,
Edited by thummel1 - 23 Sep 2016 at 8:57am
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum