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 add a 0 in a number column

Srikkanth.MMar 25 2010 — edited Mar 25 2010
Hai All

I my table i had three column

Intime declared as date

Outime as date and Working_time is declared as number


So while subracting intime and outtime i got a result in three digit


For eg

outtime is 1715 and intime is 0815 then working_time is 0900 i need result like this but i got 900


Even though i have added lpad in it ...My update statement is


update dail_att set wtime = lpad((to_number(to_char(outtime,'hh24mi')-to_char(intime,'hh24mi'))),4,0);

Regards

srikkanth.M
This post has been answered by 009 on Mar 25 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 22 2010
Added on Mar 25 2010
5 comments
581 views