Syntax
ADDTODATE(<date> <string, using date constant>)
Description
Adds (or subtracts) time to a date using an integer and one date constant.
Time unit | Constant |
---|---|
Year | y |
Month | M |
Day | d |
Hour | h |
Minute | m |
Second | s |
Millisecond | ms |
Examples
Date | String used | ADDTODATE result |
---|---|---|
Oct 15, 2002 04:36:34 AM | 5y | Oct 15, 2007 04:36:34 AM |
Oct 15, 2002 04:36:34 AM | 3M | Jan 15, 2003 04:36:34 AM |
Oct 15, 2002 04:36:34 AM | 5000s | 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).