← dateadd operator page · time/dateadd/sc_date/one_year_later
pandas ✅ · DuckDB ✅
dateadd(SC_1, 1, "A") with SC_1 = 2020-02-10: one year added to a date.
Add time unit to date: "adding years to a given date returns the date plus integer years; for years the “Y” is used", and "dateadd (2020-02-10, 1, “Y”) gives 2021-02-10".
DS_r = 2021-02-10, a Date, the page's result.
The year is written A, not the page's “Y”: VTL prescribes no representation of durations, and the chapter's list of period indicators gives A for a year and says that "each VTL system can personalize the representation of time, date, time_period and duration as desired". vtlengine's docs/data_types.rst gives the same codes for Duration, and the manual's default conversion from string to duration (Type conversion) reads A, S, Q, M, W or D.
DS_r := dateadd(SC_1, 1, "A");
| SC_1 |
|---|
| 2020-02-10 |
{
"scalars": [
{"name": "SC_1", "type": "Date"}
]
}
{
"scalars": [
{"name": "DS_r", "type": "Date", "value": "2021-02-10"}
]
}