Convert date

G

gary

How can I convert a date in this format (mm-dd-yyyy) to a
Julian-date (i.e., YYYYDDD)?

For example: 09-13-2003 to 2003256
 
R

Ron Rosenfeld

How can I convert a date in this format (mm-dd-yyyy) to a
Julian-date (i.e., YYYYDDD)?

For example: 09-13-2003 to 2003256

Here's one way, with the date in A1:

=TEXT(A1,"yyyy")*1000+A1-DATE(YEAR(A1),1,0)

Format the cell as General or as Number with 0 decimal places.


--ron
 

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

Top