There will be some situations where we need to compare two dates during the data analysis, to verify how many specified time intervals exist between them. The comparison can be to identify the number of days, weeks, and months between the dates specified.
- Note: The below specified functions are common in both Apache Hive & Apache Impala.
DATEDIFF function is Apache Hive, behaves almost same as in relational systems such as MySQL and SQL Server. Only limitation is it accepts only two parameters and returns number of days between two dates.
Hope you liked this post.
Please click on the follow button to receive notifications on latest posts.
4 comments