Date functions

Ability allows you to perform arithmetic with dates and times. To do this, it has a built-in numbering sequence, called a date/time code, that starts on 1st Jan 1900 and increases by one for each subsequent day.

The date time code has a fractional component as well, to correspond to the hour, minute and second since midnight. A date/time code of 1.5 represents one-and-a-half days since the start of the year 1900, that is 12:00 noon on the 2nd Jan 1900.

For example:

Date/time code

35484.47917

24th Feb 1997 11:30:00 AM

Date code

35484

24th Feb 1997 i.e. 35484 days since 1/1/1900

Time code

0.47917

11:30 AM i.e. 0.47917 * 24 hours since midnight

A date code, then, is the integer part of a date/time code, and a time code is the fractional remainder.

You can use Ability’s built-in date functions to generate a date/time code or to translate a date code into the weekday, day, month or year, and a time code into hours, minutes and seconds.

To change how a date/time code is displayed, use the Number command from the Format menu and then select a date format.

Here is a complete list of date functions in Ability:

DATE

DATEVALUE

DAY

DAYS360

EDATE

EOMONTH

HOUR

MINUTE

MONTH

NETWORKDAYS

NOW

SECOND

TIME

TIMEVALUE

TODAY

WEEKDAY

WEEKNUM

WORKDAY

YEAR

YEARFRAC

See also:

Year 2000 for details on how Ability deals with dates in the 21st Century.

Other functions