Datediff
Calculates the difference between two date, time, or timestamp expressions based on the date or time part requested. Difference is calculated as date_1 - date_2.
Name | Type | Description | Is Optional |
---|---|---|---|
date_part | date_part | | |
date_1 | mixed_value | Starting date. Can be a date column, date, time, or timestamp. | |
date_2 | mixed_value | Date to subtract from date_1. Can be a date column, date, time, or timestamp. | |
alias | value | Name for the new column created by the datediff. | True |
ds = rasgo.get.dataset(id)
ds2 = ds.datediff(date_part='year', date_1='END_DATE', date_2="'2022-01-01'")
ds2.preview()
Last modified 1yr ago