[英]Convert hours:minutes to seconds where hours > 24
I have a string 47:45.我有一个字符串 47:45。 That means 47 hours, 45 minutes.
这意味着 47 小时 45 分钟。 I want to convert that string to seconds.
我想将该字符串转换为秒。
select datediff(second, '00:00','47:45') <-- does not work
select datediff(second, '00:00','47:45') <-- 不起作用
what is the quickest way to find the 171.900 seconds I am looking for?找到我正在寻找的 171.900 秒的最快方法是什么?
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.一种方法是将分号分隔的值分隔开,将分钟部分乘以 60,将小时乘以 3600,然后将结果相加。 Thanks!
谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.