Solved

Julian date conversion error

Posted on 2007-04-10
3
2,242 Views
Last Modified: 2013-11-16
Hi,

I need to convert a Julian date in Excel that orginated in SAS, but am getting the wrong result by about 50 years. Example:

SAS Julian date: 12432
Represents: 14-Jan-1994

In excel by default this instead gives date 13-Jan-1934  (using TEXT(12432,"dd-mmm-yyyy")

How can i get Excel to return the required date of 14-Jan-1994 ?

Thanks!




0
Comment
Question by:xenium
  • 2
3 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 125 total points
ID: 18885285
=TEXT(A1+21916,"dd-mmm-yyyy")

Or, enter 21916 in a free cell, select the cell, press CTRL=C, select all of the date values to be adjusted, choose the menu command Edit->Paste Special, select Add, click OK. Once the date values are fixed you can format the cells as dates.

Kevin
0
 

Author Comment

by:xenium
ID: 18885390
Thanks, this works, and it seems to click now...
SAS is using a Julian base of  01-Jan-1960  
This is 21916 days after the Excel base of 00-Jan-1900
Is this correct?
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 18885405
Yup.

Kevin
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question