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!

Format mask a number

768419Nov 1 2011 — edited Nov 1 2011
Hi,
I'm using db 10.2.0.1.0
I'm trying to find a difference between two dates using the below formula
:STM_DURATION := to_number	( trunc( :STM_END_TIME - :STM_ST_TIME )*24 
     +  trunc( mod( (:STM_END_TIME - :STM_ST_TIME)*24, 24 ) )   
     ||'.'|| trunc( mod( (:STM_END_TIME - :STM_ST_TIME)*24*60, 60  ) )) ;
But if the difference is 3 minutes or 30 minutes, it is showing .3
How can i set the number to 2 decimal point? or how can i find the actual difference
Thanks

Edited by: Divya on Oct 31, 2011 10:12 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2011
Added on Nov 1 2011
8 comments
136 views