If i have two columns with start_date and end_date, how can i find the difference between them using TIMESTAMPDIFF and CAST operator.
Column1 with start_date: 2001-07-11-16.51.40.000000
Column2 with end_date: 2001-07-12-09.21.54.000000
Output: 75301 7h 53min 01sec 7.88
I try something like this
SELECT START_DATE, END_DATE
CAST(TIMESTAMPDIFF(HOUR, START_DATE, END_DATE)) AS TIME
FROM TABLE;