Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to convert MM:SS into Seconds with varying values of Minutes length.

user555994Jan 30 2007 — edited Jan 30 2007
I have one table in Oracle where there is one Column "Duration" and it is having entries like
59:00,
30:00,
59:05
30
120:45

etc.

These entries are in Minutes and Seconds with MM:SS Format.Where MM:SS stands for Minute and SS is seconds only.
Minutes can be of Length 1 (i.e. 01:00) of Length 2 (18:00) of Length 3 (i.e. 200:00) of Length 4 (i.e. 1440:00).

I need to convert these Minutes (MM:SS) only into Seconds and want seconds as it is using SQL Query.
Note:-Here Duration will be in MM:SS format like 65:06,100:00,1200:30
Minutes or it can be in seconds also 50,30 etc.

DURATION column is VARCHAR2 and database is Oracle.

Please suggest SQL Query and help me to convert it as it is needed badly.
Thanks in Advance for Help and Inputs.Looking forward for all kind of Help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2007
Added on Jan 30 2007
12 comments
463 views