Time diff in Amazon Athena / Presto (seconds and minutes )

Latent picture Latent · Mar 20, 2017 · Viewed 18.2k times · Source

I have a list of creation time stamps and ending time stamps , i would like to get the amount of seconds last from creation to ending . could not find any way to do that without using UNIX time stamp (which i dont have at the moment) .

something like that :

datediff('second',min(creation_time),max(ending_time))

creation_time = '2017-03-20 10:55:00' ..

Answer

David דודו Markovitz picture David דודו Markovitz · Mar 20, 2017

date_diff

date_diff('second', min(creation_time),max(ending_time))