TODAY

Description

The TODAY function evaluates to the current date.

Usage

TODAY()

Remarks

The TODAY() function will always evaluate to the current date.

Note: the current date depends on the time zone in question. The date in New York City may be different than the date in Canberra, Australia at the same instant. ActivityInfo in some cases uses the user’s browser’s timezone to determine the current date, which can lead to two different users seeing different data at the same time.

Examples

Calculating ages

The TODAY can be used with together with the YEARFRAC function to calculate ages from birthdates. For example:

FLOOR(YEARFRAC(DOB, TODAY()))

Calculating delays

You can also use the DAYS function to find the number of days between today and some event in the past. For example, if you are providing emergency case management, you might want to know how long an urgent case has been open. If you have a date field with the code CASE_OPENED, you could calculate the number of days the case has been opened using the formula:

DAYS(TODAY(), CASE_OPENED)

Note that the order of arguments for YEARFRAC and DAYS is switched. We have inherited this infelicity from Excel.

Storing the date a record was added

If you use TODAY() in a calculated field, the value will not stay the same, it will always reflect the current date.

However, you can use TODAY() as the default value formula for a date field. In this case, ActivityInfo will store the date when the record was first added:

Next item
YEAR