· Apr 4

How can I convert two timestamps into time format (HH:MM:SS)?

For example, I have two timestamp values ('2024-04-01 10:00:00', '2024-04-01 11:30:30'). I would like to find the difference between these two timestamps, and I need the result in hours:minutes:seconds (hh:mm:ss) format.

Expected Output: 01:30:30

Note: I need an SQL query command. I should not use ClassMethod, Function, or Stored Procedure.

Could anyone please provide me with an SQL query for my question?

Discussion (4)1
Log in or sign up to continue