SQL Language (MOSC)

MOSC Banner

Fixed positions

edited Nov 21, 2012 12:30AM in SQL Language (MOSC) 11 commentsAnswered ✓
Hi,

I convert a Oracle time duration to string with:

to_char(trunc(DURATION*24))||to_char(to_date('01-01-2000 00:00:00', 'DD-MM-YYYY HH24:MI:SS')+duration,':MI:SS')

The result of the hour position is variable, it could be 0:06:58 or 13:56:20.

Is there a possibility that the first positions are two characters: 00:06:58 instead of 0:06:58.

Thanks.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center