dates

  • Thread starter Thread starter mark
  • Start date Start date
M

mark

is there a function that will take the date of 7/1/03 and
return 181 as the day number. This needs to disregard the
year. So 7/1/01 will still return 181. Currently Im
converting the dates to the current year than subtracting
it by 1/1/03.

ahelp

thanks
 
mark said:
is there a function that will take the date of 7/1/03 and
return 181 as the day number. This needs to disregard the
year. So 7/1/01 will still return 181. Currently Im
converting the dates to the current year than subtracting
it by 1/1/03.

ahelp

You can use
=A1-DATE(YEAR(A1),1,1)
to get 181 from either 7/1/03 or 7/1/01 (US-style).

However, the day number within the year for these dates should be 182, not
181. (Think of 1/1/01 minus 1/1/01, which is 0 - but it is day 1.) So really
you need
=A1-DATE(YEAR(A1),1,1)+1
 
However, the day number within the year for these dates should be 182, not
181. (Think of 1/1/01 minus 1/1/01, which is 0 - but it is day 1.) So really
you need
=A1-DATE(YEAR(A1),1,1)+1

You meant:
=A1-DATE(YEAR(A1),1,1)-1
or
=A1-DATE(YEAR(A1),1,)

Regards,

Daniel M.
 
Back
Top