convert MM:SS to total seconds

Database
Enthusiast

convert MM:SS to total seconds

Hi, I have a column where time is in MM:SSSS format.

I need this is total Seconds, how can i convert it into total seconds.

Thanks

2 REPLIES
Teradata Employee

Re: convert MM:SS to total seconds

Try with this:

select CAST((INTERVAL '12:23' Minute to second) AS INTERVAL second(4))
Junior Supporter

Re: convert MM:SS to total seconds

Hi.

Format MM:SSSS is not a valid format for time, MM:SS either. 

It should be 'mi:ss'.

Cheers.

Carlos.