Thread: Day of year
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default Day of year

Probably one of those "don't pay any attention to me today - I DID take my
meds!" days - been on pain killers for 2 days now. But March 1, 2007 is
Julian day 60 (31 in Jan, 28 in feb 59 + 1 = 60) But in Leap Years, March 1
is Julian day 61 (31+29+1) So you have to be talking about the same year if
you use TODAY for a comparison - if you happened to be speaking of a day in a
leap year but used a non-leap year to calculate Julian date, then the day
would be off by 1 if the date was after Feb 28 of that year.

"Dave Peterson" wrote:

Huh?
<bg



JLatham wrote:

Yes, as long as both dates are in same year, but if one date was after Feb 29
of a leap year and other year is not leap year...

"MartinW" wrote:

And following that
=TODAY()-DATE(YEAR(TODAY()),1,0)
Should work in any year.

HTH
Martin




--

Dave Peterson