简体   繁体   English

将小时:分钟转换为秒,其中小时 > 24

[英]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.

相关问题 计数与前 24 小时的天差 - Day difference of counts from prior 24 hours CloudWatch 无法在 24 小时内可靠地监控单个数据点 - CloudWatch doesn't reliably monitor single datapoint within 24 hours 在过去 24 小时内从 Firestore 中的集合中获取最大文档 - Getting biggest document from a collection in the last 24 hours in Firestore 24 小时后自动更改 Firestore 中的变量 - Swift - Automatically change a variable in Firestore after 24 hours - Swift 24 小时后自动更改 Firestore 中的变量 - Android 中的 Java - Automatically change a variable in Firestore after 24 hours - Java in Android Pyspark df.write 耗时极长(超过 24 小时) - Pyspark df.write taking extremely long (over 24 hours) Firebase Remote Config A/B 测试显示 24 小时后没有结果 - Firebase Remote Config A/B testing shows no results after 24 hours 在 Twilio 和 Sendgrid api 中,计划消息以 5 小时 30 分钟的时间差发送 - Scheduled messages are sent at difference of 5 hours 30 minutes in Twilio and Sendgrid api 在 Android 中从 Firestore 获取最近 24 小时的文档 - Get documents of last 24 hours from Firestore in Android 在 Google Data Studio 中将纪元时间格式化为小时分钟 - Formatting Epoch time as Hours Minutes in Google Data Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM