Sunday 13 November 2022

Hive: date_add: Add number of days to the given date

Signature

date_add(string date, int noOfDays)

hive> SELECT date_add('2021-05-12', 5);
OK
_c0
2021-05-17
Time taken: 0.127 seconds, Fetched: 1 row(s)
hive> ;
hive> SELECT date_add('2021-05-12', -5);
OK
_c0
2021-05-07
Time taken: 0.044 seconds, Fetched: 1 row(s)

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment