Below query is my sql server query and I want it to convert it into hive query:
select DATEDIFF([minute], '19000101', '2013-01-01 10:10:10')
Below query is my sql server query and I want it to convert it into hive query:
select DATEDIFF([minute], '19000101', '2013-01-01 10:10:10')
You could use
unix_timestamp
for dates after1970
:1970-01-01
EDIT:
Adding Minutes:
change date to unixtime -> add var * 60sec -> convert back to date
db<>fiddle demo using MySQL