Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Syntax

ADDTODATE(<date> <string, using date constant>)

Description

Adds (or subtracts) time to a date using an integer and one date constant.

Time unitConstant
Yeary
MonthM
Dayd
Hourh
Minutem
Seconds
Millisecondms

This function can be used to subtract time away from a date by using the method above with a minus sign "-" before the integer and constant.

The function respects Daylight Saving Time (DST). Depending on the date "-1d" could also subtract 23 or 25 hours when used with this function. Learn more in our knowledge base article about how this function works.

Examples

DateString usedADDTODATE result
Oct 15, 2002 04:36:34 AM5yOct 15, 2007 04:36:34 AM
Oct 15, 2002 04:36:34 AM3MJan 15, 2003 04:36:34 AM
Oct 15, 2002 04:36:34 AM5000s

Oct 15, 2002 06:29:54 PM

Oct 15, 2002 04:36:34 AM-5000s

Oct 14, 2002 02:43:14 PM

Datameer always uses the following format:

Three character month abbreviation (space) two digit day (comma)(space) four digit year (space) two digit hour (colon) two digit minute (colon) two digit second (space) two character meridiem notation.

(e.g., 12.01.2012 gets transferred to Jan 12, 2012 12:00:00 AM)

When selecting a pattern, you select the way the data gets parsed (your input format, this can be connected to your systems representation of dates and times).


  • No labels