convert date to yyyyddd format

G

Guest

Hi,

How can I format a date into the fomat yyyyddd where ddd is the day of the
calender year (i.e. out of 365 or 366 if a leap year. Assume my date is in
cell A2.

Bruce
 
D

Dave Peterson

=YEAR(A2)*1000+A2-DATE(YEAR(A2),1,0)
or
=YEAR(A2)&TEXT(A2-DATE(YEAR(A2),1,0),"000")
(if you want text)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top