Please help me to convert below Greenplum code to Hive supported one.
GP:
date_trunc('second', now())::timestamp without time zone load_time
Expecting to convert similar operation and output in hive
Please help me to convert below Greenplum code to Hive supported one.
GP:
date_trunc('second', now())::timestamp without time zone load_time
Expecting to convert similar operation and output in hive
select timestamp(substr(current_timestamp,1,19)) as load_time
Result:
2022-02-08 13:18:27.0
substr() leaves only seconds, works as truncate.
and timestampt() - to convert from string to timestamp datatype.