79582516

Date: 2025-04-19 14:53:46
Score: 1.5
Natty:
Report link

Turns out I needed to dive more into Hive functions.

Here's the solution to my problem, using this SQL code I'm able to do the conversion while extracting the column:

SELECT from_unixtime(unix_timestamp('Jan 18 2019 1:54PM', 'MMM dd yyyy h:mma'), 'yyyy-MM-dd HH:mm:00') AS formatted_date;

Result:

formatted_date
2019-01-18 13:54:00
Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Paolo Cimmino