SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 38811: Julian Date - Business and ISO 8601 Usage

DetailsCodeResultsAboutRate It

Definitions of Julian dates

The term “Julian date” historically has been used by business users to denote the year and sequential day of the year.

For astronomers, “Julian date” is the number of days since noon GMT on Jan 1, 4713 BCE. This date was chosen because it is before recorded history.

Since 1988, ISO 8601 defines current Julian date usage as astronomers use it. This usage is becoming more common than the business use of Julian date – now called “Ordinal date”.

SAS functions, informats and formats

  • DATEJUL Function
  • JULDATE Function
  • JULDATE7 Function
  • JULIANw. Informat
  • JULDAYw. Format
  • JULIANw. Format

The items above all refer to what is now called “Ordinal date”. There are no current plans to change the names or functionality of these items.

SAS Date Values

A SAS date is a value that represents the number of days between January 1, 1960, and a specified date. SAS can perform calculations on dates ranging from A.D. 1582 to A.D. 19,900. Dates before January 1, 1960, are negative numbers; dates after are positive numbers.

  • SAS date values account for all leap year days, including the leap year day in the year 2000.
  • SAS date values can reliably tell you what day of the week a particular day fell on as far back as September 1752, the most recent time when the calendar was adjusted by dropping several days. SAS day-of-the-week and length-of-time calculations are accurate in the future to A.D. 19,900.

Conversion between SAS date values and Julian Date values

When the date falls in the range that can be represented as a valid SAS date, convert to Julian date by adding 2436934.5 to the SAS date value. The .5 compensates for the difference between the beginning of the day for a SAS date value (midnight) and beginning of a Julian Day (noon). If the date cannot be represented as a SAS date, you must derive your own formula.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemN/AMacintosh
Macintosh on x64
Microsoft Windows 2000 Professional
Microsoft® Windows® for 64-Bit Itanium-based Systems
Microsoft Windows Server 2003 Datacenter 64-bit Edition
Microsoft Windows Server 2003 Enterprise 64-bit Edition
OpenVMS VAX
z/OS
Microsoft Windows XP 64-bit Edition
Microsoft® Windows® for x64
OS/2
Microsoft Windows 95/98
Microsoft Windows 2000 Advanced Server
Microsoft Windows 2000 Datacenter Server
Microsoft Windows 2000 Server
Microsoft Windows NT Workstation
Microsoft Windows Server 2003 Datacenter Edition
Microsoft Windows Server 2003 Enterprise Edition
Microsoft Windows Server 2003 Standard Edition
Microsoft Windows Server 2008
Microsoft Windows XP Professional
Windows 7 Enterprise 32 bit
Windows 7 Enterprise x64
Windows 7 Home Premium 32 bit
Windows 7 Home Premium x64
Windows 7 Professional 32 bit
Windows 7 Professional x64
Windows 7 Ultimate 32 bit
Windows 7 Ultimate x64
Windows Millennium Edition (Me)
Windows Vista
64-bit Enabled AIX
64-bit Enabled HP-UX
64-bit Enabled Solaris
ABI+ for Intel Architecture
AIX
HP-UX
HP-UX IPF
IRIX
Linux
Linux for x64
Linux on Itanium
OpenVMS Alpha
OpenVMS on HP Integrity
Solaris
Solaris for x64
Tru64 UNIX
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.