Hive date_format Function Guide
The date_format function in Hive is used to format date data according to a specified format. The syntax is as follows:
date_format(date, format)
In this case, the “date” is the date data that needs to be formatted, whether it is a date field or a date string. The “format” is the desired date format, such as “yyyy-MM-dd HH:mm:ss” which represents year-month-day hour:minute:second.
I don’t have time to waste.
I can’t afford to waste any time.
SELECT date_format('2022-03-15', 'yyyy-MM-dd');
This will return the formatted date string “2022-03-15”.