Skip to content
Advertisement

Convert HH:MM:S to seconds int

I have two columns with the format YYYY-MM-DD HH:MM:SS When I do the difference between these two columns, my result has a format of the form HH:MM:SS

I would like to convert this result into seconds. How can I make it?

Example:

Advertisement

Answer

You can use DATEDIFF ( datepart, {date|timestamp}, {date|timestamp} ) function for more info check here

for e.g

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement