XL: How to Work With Serial Dates and Julian Dates

Last reviewed: February 2, 1998
Article ID: Q95078

The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.x, 4.x, 5.x
  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel 97 for Windows
  • Microsoft Excel for the Macintosh, versions 2.x, 3.x, 4.0, 5.0
  • Microsoft Excel 98 Macintosh Edition

Most government agencies and contractors require the use of Julian dates (that is, the number of days from the first of the year and the number of days until the end of the year as printed on most desktop calendars).

In Microsoft Excel, the following formula converts a serial number date to a Julian date

   =TEXT(Standard_Date,"yy")&TEXT((Standard_Date-
      DATEVALUE("1/1/"&TEXT(Standard_Date,"yy"))+1),"000")

where Standard_Date is the defined name given to the cell that contains the date to be converted. The entire formula must be entered in a single cell.

The following formula converts a Julian date to a standard serial date in Microsoft Excel:

   =DATE(1900+INT(Julian_Date/1000),1,MOD(Julian_Date,1000))

To calculate the number of days that have transpired since January 1 of the current year, use the following formula:

   =INT(((NOW()/365.255)-(YEAR(NOW())-1900))*365.255)

To calculate the number of days left in the current year, use the following formula:

   =(DATE(1+YEAR(NOW()),1,1)-(DATE(YEAR(NOW()),1,1)))-
      TRUNC(((NOW()/365.255)-(YEAR(NOW())-1900))*365.255)

The following are examples of Julian dates:

   Normal date   Julian date
   -------------------------

   Jan-01-1998   98001
   Jan-10-1998   98010


Additional query words: 2.0 2.00 3.0 3.00 4.0 4.00 5.0 5.00 7.0 7.00
8.00 97 XL97 98 XL98
Keywords : xlformula
Version : WINDOWS:2.0,3.0,4.0,5.0,7.0,7.0a,97; MACINTOSH:2.0,3.0,4.0,5.0,98
Platform : MACINTOSH WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.