I am trying to convert following string to timestamp. however not able to figure out how to handle last milisecond part
String:
2020-06-30T23:57:48.000-0400
following is working. howsoever it's loosing information about milliseconds.
hive> select from_unixtime(unix_timestamp("2020-06-30T23:57:48.000-0400", "yyyy-MM-dd'T'HH:mm:ss.SSS'-'SSS"), "yyyy-MM-dd'T'HH:mm:ss.SSS'-'SSSS");
OK
2020-06-30T23:57:48.000-0000
Expected Value
2020-06-30T23:57:48.000-0400
update
even this is not working
Query
hive> select date_format("2020-01-23 23:59:54.0000400", "yyyy-MM-dd HH:mm:ss.SSSSSSS");
output
2020-01-23 23:59:54.0000000