Today


Release:

 • 4.6 •  5.0 •  5.1 •  5.2 •  5.3 •  5.4 •  6.0 •  6.1 •  6.2 •  6.3 •  6.4 •  6.5 •   •  6.6 •  7.0 •  7.1 •  7.2

Today(withTime, utc, timeZone)

Returns the current date (number of days since base date -- usually Jan 1, 1900.

With optional parameter withTime: True, it includes the current time as a fraction of a day. Select a number format to show the date and/or time.

By default, it uses the time zone set in the Windows OS. With optional parameter UTC: True, it returns the date and time for universal time code (UTC) formerly known as Greenwich Mean Time (GMT).

New to Analytica 7.2: The result is the wall-clock date and time in the model's time zone, the system variable Sys_TimeZone, whose default 'Local' is this computer's zone (so nothing changes unless you set it). The optional «timeZone» parameter overrides it for one call: 'Model', 'Local', 'UTC' or a fixed offset such as '+05:30'; for example Today(True, timeZone: 'UTC') or Today(True, timeZone: '-08:00'). utc: True is a synonym for timeZone: 'UTC'. Note that even the date returned by Today() depends on the zone.

If a variable contains Today() in its definition, e.g.

Variable Day := Today()

its value will be based on the date and time when it was last evaluated in the current model session. So, it will be out of date when you look at it later, unless you cause it to be re-evaluated.

Library

Date functions

See Also

Comments
Loading comments...