The ADDDATE function in Apache Impala is equivalent to the DATEADD function in most RDBMSs. This function is widely used for data analysis and business logic implementations. This function’s goal is to add a certain number of days to a TIMESTAMP column/value.
Example:
SELECT NOW() AS CurrentDate, ADDDATE(NOW(), 30) DateAfter30Days;
….—…………CurrentDate…………….|………..–.DateAfter30Days–………..
2021-10-30 09:15:41.895351000 | 2021-11-29 09:15:41.895351000
SELECT NOW() AS CurrentDate, ADDDATE(NOW(), 1) DateAfter1Day;
….—…………CurrentDate…………….|………..–.DateAfter1Day–..–………
2021-10-30 09:15:41.895351000 | 2021-10-31 09:15:41.895351000
I hope you found this post to be informative.
Please join our mailing list to receive more interesting information.