Dates, times, and date calculations

Top  Previous  Next

If you have limited spreadsheet experience, the following introduction to how spreadsheets store dates and times will help you quickly become comfortable with handling date and time information in FormCalc SST, allowing you to do date and time calculations and much more.

How Spreadsheets Store Dates and Times

Spreadsheets—and many other computer programs—internally represent date and time information as a single number. The following number represents 7:50 am. on November 15, 2013:

41593.327

The whole-number part (41593) represents the date, November 15, 2013, and the fractional part (.327) represents the time, 7:50 am.

This is sometimes called the "1900 date system" because the whole number part represents the number of days elapsed since January 1, 1900.

Probably the two most important things to know about dates and/or times stored this way are:

1.Because dates and times are stored as numbers, date and time math is easy.

If today is represented by 41593 and yesterday is represented by 41592, it's easy to see how you can calculate the number of days between two dates (41593 - 41592 = 1 day). Calculating the number of hours, minutes, and seconds between two times is just as easy.

2.You can format date/time numbers in many different ways.

Here are differently-formatted representations of 41593.327:

11/15/2013

Date only

11/15/2013 7:50:52 AM

Mixed date and time

7:50 AM

Time only

15.November.13

...and many other ways

Changing the format of a date/time number does not change the number, only the way it is displayed.

See also:

A simple date math example