days since 1/1/current year

  • Thread starter Thread starter dan
  • Start date Start date
D

dan

Is there a formular for days since 1/1/current year
like =weekday(today()) ' day of the week
=DAY(today()) ' day of the month
=today() ' days since 1/1/1900
 
=today()-date(year(today()),1,0)

The 0th day of January of this year is Dec 31 of the previous year.
 
Ps. You may want to subtract 1.

=today() is really the number of days since 12/31/1899 (with Feb 29, 1900
included in the count).
 
won't 2/29/1900 also be included in date(year(today()),1,0)? when evaluating
the difference between two dates, I would think it s/b an issue only if one
of those dates is prior to 2/29/1900.

Dave Peterson said:
Ps. You may want to subtract 1.

=today() is really the number of days since 12/31/1899 (with Feb 29, 1900
included in the count).
 
It would.

But I was just trying to address the OP's original statement:


won't 2/29/1900 also be included in date(year(today()),1,0)? when evaluating
the difference between two dates, I would think it s/b an issue only if one
of those dates is prior to 2/29/1900.
 
Back
Top