Skip to main content
Question

DateTime Calculations and Leap Years

  • November 27, 2020
  • 1 reply
  • 15 views

ebygomm
Influencer
Forum|alt.badge.img+39

Just wanted to check before I put something in place to handle it. Is there anything in either the Date/Time Functions or Date Time Converter that allows you to specify that 1 year on from the 29 February 2020 is the 1st March 2021 rather than the 28 February 2021?

1 reply

Forum|alt.badge.img+2
  • November 27, 2020

@ebygomm​ It seems pretty common that one year from 29 February 2020 is 28 February 2021. So think you'd have to make an exception for leap years and add an extra day if you need the next year to start at 1st March 2021 instead. If you calculate the interval between 29 February 2020 & 1st March 2021 it gives you P1Y1D


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings