View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Convert julian date

The problem with 2-digit years is knowing when the century is 1900 or 2000.
Pick a cut-off year (say 60) and assume anything less than that is in the
2000 century and anything equal to or greater is in the 1900 century...

=DATE(1900+100*(--LEFT(A1,2)<60)+LEFT(A1,2),1,(MID(A1,3,3)))

--
Rick (MVP - Excel)


"JHL" wrote in message
...
I have a julian format of YYDDD. The formula I'm using is off a day and a
century.

Formula =date(left(a1,2),1,(mid(a1,3,3))

05059 = 3/31/1905

How can I get the correct answer of 2/28/2005?

Thanks in advance.