Gowri
Gowri

Reputation: 16855

MySQL convert minutes to seconds

I have stored minutes in normal number like 10 (10 minutes) not in any time format.Now i like to convert minutes to seconds. Is there any functions available in mysql

EX

Result(seconds) = min * 60

600(seconds) = 10 (min) * 60

Thanks in advance

Upvotes: 2

Views: 3375

Answers (2)

Erik
Erik

Reputation: 302

You could just do something like this:

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

Upvotes: 2

Matt Ball
Matt Ball

Reputation: 360046

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

SELECT foo.min*60 AS sec FROM foo 

Upvotes: 3

Related Questions