 Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: How Excel Stores Dates and Times.

# How Excel Stores Dates and Times Written by Allen Wyatt (last updated January 25, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003

Internally, Excel stores a date or time as a number. The whole part of the number (the part to the left of the decimal point) represents the number of days since an arbitrary starting point (typically January 1, 1900). The decimal portion (the part to the right of the decimal point) represents the time for that date. These internal representations of dates and times are often referred to as serial numbers.

To see how this works, enter the number 23 in a cell. If you have not previously formatted the cell, Excel uses the General format, displaying the number simply as 23. If you later format this cell using a date format—m/d/yy, for instance—Excel changes the display to 1/23/00, or January 23, 1900.

The portion to the right of the decimal point represents a fractional portion of a day. Thus, a single second would be equal to approximately 0.00001157407, since that is equal to 1 (a day) divided by 86,400 (the number of seconds in a day).

Since Excel stores dates and times as serial numbers, you can do math on them. For instance, if you wanted to determine the number of days between two dates, or the amount of time between two times, simply subtract them from each other. The result is the number of days and fractions of days between the two.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2176) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: How Excel Stores Dates and Times.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Want to add a border diagonally, through the middle of a table cell? It's easy if you follow the formatting steps ...

Discover More

Saving All Open Workbooks

Wouldn't it be nice to have a single command that would save each of your open workbooks, all at once? It's easy to do ...

Discover More

Adding a Full-Width Line in a Macro

The AutoFormat feature in Word allows you to type special character sequences (such as three dashes or three underscores) ...

Discover More Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

Backwards Date Parsing

Enter information into a worksheet, and you come to anticipate (and count on) how Excel will interpret that information ...

Discover More

Converting UTC Times to Local Times

Dates and times are often standardized on UTC time, which is analogous to GMT times. How to convert such times to your ...

Discover More

Calculating Time Differences between Two Machines

Want to know how much of a time difference there is between your machine and a different machine? This tip provides some ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 4 + 0?

2022-03-29 22:35:01

Peter

Hi Tim
If you just want to deal with clock time in your example, you need to discard the integer number of days to the left of the decimal point. Otherwise you are dividing (1+0.77791203703704) by 3 and will get the expected answer 0.592637346 or 2:13:24 PM.

You can get the fractional part representing clock time by using one of the expressions MOD(A1,1) or A1-INT(A1)

You have also discovered that day 1 of the Excel calendar is 1/1/1900. Day 0 is 0/1/1900.
So the formula bar was correctly showing a date-time value of 1 day, 18h, 40min, 12 sec albeit as 1/01/1900 6:40:12 PM

2022-03-28 17:39:47

Tim

if this is all true, then explain why one cannot simply divide a time and get the correct results? for example, a time is stored in cell a1 with a value of 1.77791203703704. formatting that to hh:mm yields 18:40, with the formula field showing 1/1/1900 6:40:12 PM. Dividing the value by 6, i would expect to see 3:06, but instead i see 7:42.
I can get to the correct 3:06 by using the equation "=((hour(a1)*3600+minute(a1)*60+second(a1))/6)/86400", (convert time to number of seconds), divide by 6, then convert back to fraction of a day. but why can i not just divide the fraction of the day by 6 and get the same results? I know I'm missing something!

##### This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.