Convert Day of Year to Calendar Month during a leap year in Excel

385 views Asked by At
Year    Day          Time           TimeStamp
2008    60    3/1    2400    0:00   03/01/2008 00:00

I'm converting DOY to regular calendar month but since 2008 was a leap year the formula I was using for non-leap years does not work. I tried subtracting the formula by 1 but it still gives me the wrong date. Day 60 in 2008 is 02/29/2008.

=A1+41274 for non-leap years (this yields 03/01/2008).

=A1+41273 tried this for the leap year (this yields 02/28/2008).

1

There are 1 answers

1
Valli On

Excel already has a formula to find the date when the day number and an year is mentioned DATE(Year,1,day) This returns the date In your case it is, DATE(2008,1,60) This returns 29/02/2008