Timestampdiff(hour,STR_TO_DATE(start_date, '%Y-%m-%d %H:%i:%s'),
STR_TO_DATE(target_date, '%Y-%m-%d %H:%i:%s')) as duration hours
I have tried to get duration using start date and target date which are in string format. Need to convert it into date format, need create new column for duration in hours and duration in days ....here duration means difference between start date and Target date.in presto SQL.
Also in Presto you should be able to subtract a timestamp from another, bigger, timestamp, and get an interval literal: