cancel
Showing results for 
Search instead for 
Did you mean: 

How do I check if a year is a leap year in canvas ord report?

elnatan2604
Explorer
0 Kudos
199

Hi im trying to make a column checks if a certain year is a leap year and if so will give me the output of 29/02/(leap year) and if not it will give me 29/08/(normal year). For exmple 2024 is a leap year so we will get in the table 29/02/2024, 2025 is not a leap year so we will get 28/02/2025. I found here an answer of doing it hard coded, to put all the leap years and to give it a value of 1 is a leap year and 0 is not but I dont want to do it like that. I tried another thing to take the year and devide it by 4 and try to do something with the remainder but I didnt succeed.

Accepted Solutions (0)

Answers (1)

Answers (1)

nlgro023
Active Contributor
0 Kudos

Long story short, you need a calculated column that takes the year of that date, and need to make another calculated column that (based on that year) does a very big set of if then else statements to ensure the right number is chosen. Especially in Canvas, there is no easier way in my knowledge.