开发者

MySQL convert minutes to seconds

开发者 https://www.devze.com 2023-03-13 19:21 出处:网络
I have stored minutes in normal number like 10 (10 minutes) not in any time format.Now i like to convert 开发者_如何学Gominutes to seconds. Is there any functions available in mysql

I have stored minutes in normal number like 10 (10 minutes) not in any time format.Now i like to convert 开发者_如何学Gominutes to seconds. Is there any functions available in mysql

EX

Result(seconds) = min * 60

600(seconds) = 10 (min) * 60

Thanks in advance


You've already answered your own question: use multiplication.

SELECT foo.min*60 AS sec FROM foo 


You could just do something like this:

SELECT (minutes * 60) as 'seconds' FROM table;
0

精彩评论

暂无评论...
验证码 换一张
取 消