Can someone let me know a simple way to get # of days in a month in HIVE SQL based on current_date. e.g. 2021-02-16 = 28 days, 2021-06-30 = 30 days etc
Asked
Active
Viewed 547 times
1 Answers
0
Use
day(last_day(current_date))
last_day(date)
returns last day date, day(date)
returns day part of the date, int
See manual here: Language Manual - Date Functions

leftjoin
- 36,950
- 8
- 57
- 116