I have a query that I was asked to modify.
The original field is: Startdate with a MM/DD/YYYY format. 1/1/2020 In the source table, startdate is a string field.
I was asked to change the format to YYYY-MM-DD (mod_startdate1), but will need a 00:00:00 timestamp included. 2020-01-01
The best i can get to is mod_startdate2, but note that the minute field is replicating the month field 2020-01-01 00:01:00
query used for the screenshot. select startdate, from_unixtime(unix_timestamp(startdate,'mm/dd/yyyy'), 'yyyy-mm-dd') as mod_startdate1, from_unixtime(unix_timestamp(startdate,'mm/dd/yyyy'), 'yyyy-mm-dd HH:mm:ss') as mod_startdate2 from datamart_core.fbp_baseline limit 50 --returns date format, returns timestamp, but the month is also populating as the minutes HIVE SQL formatenter image description here
I'd appreciate any ideas to help resolve my query. Thank you.
I've found multiple repositories, but have not found 'the' solution yet