Special Handling of Date Values

Revision as of 19:23, 17 December 2014 by Psanford (talk | contribs)

Analytica includes group of Date Functions specifically designed to create and manipulate date values. But there are also some common functions which, although they are typically applied to standard numerical values, include optional parameters to handle dates. This page links to all functions that handle dates.

The dateUnit Parameter

The dateUnit parameter is available in several rounding functions. It must be called explicitly and replaces the digits parameter.

Functions that use the dateUnit parameter:

dateUnit values include: - 'Y' for Year - 'Q' for Quarter - 'M' for Month - 'WD' for Weekday - 'D' for Day - 'h' for Hour - 'm' for minute - 's' for second

Note that some of these are distinguished by case.

Some examples: Round up to the next year: Ceil(unrounded_date, dateUnit: 'Y')

Round to the nearest top of the minute: Round(unrounded_date, dateUnit: 'm')

List the next 5 Groundhog Days: Sequence(MakeDate(2015,2,2), MakeDate(2020,2,2), dateUnit: 'Y')

Comments


You are not allowed to post comments.