简体   繁体   中英

Convert hours:minutes to seconds where hours > 24

I have a string 47:45. That means 47 hours, 45 minutes. I want to convert that string to seconds.

select datediff(second, '00:00','47:45') <-- does not work

what is the quickest way to find the 171.900 seconds I am looking for?

One way to do this would by delimiting the semicolon separated values and multiplying the minutes part by 60 and hours by 3600 and adding the result. Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM