Calc - Calculating Dates
Calc - Calculating Dates
Date Formats
Language Settings
Before you can properly use dates in calculations, you need to know what whether Calc is using the
USA or Canadian date Format. Many people aren't aware Americans and Canadians use different
date formats:
• USA: Month/Day/Year - 4/5/11 would be read as April 5, 2011.
• Canada: Year/Month/Day - 4/5/11 would be converted to 2004-5-11 and read as May 11,
2004. Calc version 3 uses the strict Canadian Date format (Government) of
Year/Month/Day and but there is also a general Canadian Date format of Day/Month/Year
that earlier versions used. MS Excel uses the general Canadian date format.
Regardless of how
you type a date, Calc always represents it in the default Short date format of all numbers (Canadian
dates always displays as Year-Month-Day). However Calc supports many date formats, so if you
would rather have a date with the month spelt out or in a another date format, then modify it
through the Date category found in the Format Cells box (right click on the cell with the date and
from the Context menu choose Format Cells, or choose Format Cells from the FORMAT menu).
Don't be confused about the December 31, 1999 date shown in the Format window, it is just a
representative sample of the different date formats.
If you type a date in a cell and Calc doesn't convert it into its
default Short date format of Year-Month-Day (for a Canadian date) then you probably typed the
date wrong. Calc always aligns a proper date to the right in a cell as it does with numbers. If the
typed date is not converted to the Short date format and/or is left aligned in the cell, then Calc is
treating it as text, meaning that Calc doesn't recognize it as a date.
Date Functions
Rather than typing a current date, a date function can be used. Two common date functions are:
• TODAY function: syntax: =TODAY() - always returns the current date ever time the sheet
is opened
• NOW function: syntax: =NOW() - always returns the current date and updates the current
time after every entry/calculation
Unlike most Calc functions there are no arguments in the brackets of these two functions, in other
words the brackets () are empty. Occasionally when using these date functions instead of a date
being returned you may get a long series of numbers, known as a serial number. If that happens Use
the Format Cells menu and choose Date from the category list to convert the serial number back to
a date format of your choice. Every date is really a serial number, that's how Calc can use dates in a
calculation.
In Column B 151 days are subtracted from the date of 2011-07-21 (July 21, 2011) resulting in the
past date of 2011-02-20 (February 20, 2011).
Date functions can be typed directly into formulas if needed. The formula "=TODAY()+151" would
calculate the date 151 days from the current date. Since the TODAY() function always displays the
current date, this formula would constantly change, always displaying the date 151 days from the
current date every time the spreadsheet was opened.
Summary
Its a simple process to calculate using dates. Keep these points in mind:
• Determine whether Calc is using the USA date format or one of the two Canadian date
formats (Calc version 3 uses the strict Canadian date format).
• Ensure that the date is written in a proper date format.
• Remember that every date is a serial number and the formula really just calculates the serial
number.
• When subtracting between two dates its always the latest/future date (bigger serial number)
minus the earlier/past date (lower serial number).
• Its best to use cell references when calculate dates rather than typing a date directly into a
formula.