next up previous contents index
Next: 4.9 Miscellaneous Functions Up: 4. Built-in Functions Previous: 4.7 Financial Functions   Contents   Index


4.8 Date and Time Functions

Date and Time Functions return values corresponding to the specified date, month, year, hour, minute or second. You can also use date/time functions to enter the current system time and date in a cell. These functions open up many possibilities for managing accounts receivable and calculating test times.

SpreadScript internally stores date and time information using the same convention as other popular spreadsheet programs:

Dates are represented as an integer equal to the number of days since December 31, 1899, so January 1, 1900 equals 1.

Times are represented as fractions of a day, starting at midnight. For example, 6:00 AM is stored as 0.25 (a quarter of a 24-hour day).

Using this convention, date and time values may be used together. For example, the date/time value 1.25 corresponds to 6:00:00 AM, January 1, 1900.


Early spreadsheets mistakenly assumed that 1900 was a leap year. Therefore, date values for these programs are off by one day for all dates since February 28, 1900. To maintain compatibility across products and versions, this erroneous convention has been perpetuated with Excel and other spreadsheets, including SpreadScript.


next up previous contents index
Next: 4.9 Miscellaneous Functions Up: 4. Built-in Functions Previous: 4.7 Financial Functions   Contents   Index
SpreadScript User's Guide, Version 1.2
Grey Trout Software
02 March 2003