Dateadd

Increments a date by the specified interval value.

Parameters

NameTypeDescriptionIs Optional

date_part

date_part

A valid SQL date part. Must be one of the values listed in Supported Date and Time Parts

date

mixed_value

Date value to increment. Can be a column or literal of these types (date, datetime, time, or timestamp).

offset

int

Numeric value to increment the date by.

alias

string

Name of output column

True

overwrite_columns

boolean

Optional: if true, the output column will replace the existing 'date' column

True

Example

ds = rasgo.get.dataset(id)

ds2 = ds.dateadd(date_part='year', date='END_DATE', offset=3, alias='THREE_YEARS_FUTURE')
ds2.preview()

Source Code

Last updated