Click to See Complete Forum and Search --> : milliseconds


misuk11
08-10-2005, 06:20 AM
has anyone had any experience using dates down to the millisecond level ?

I'm converting an app from sybase to oracle and Im trying to convert

datediff(ss, '1900-01-01 12:00:00:000AM', transhist_duration_tim) * 300 as duration,

to its oracle equivalent like this

((((transhist_duration_tim - TO_DATE('01/01/1900:12:00:00AM', 'dd/mm/yyyy:hh:mi:ssam'))*24) *60) *60) * 300 as duration,

the sybase version calculates down to the millisecond, but how can this be done with oracle ?
im using 10g

tia

gamyers
08-10-2005, 08:07 PM
Look into the TIMESTAMp datatype
http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10759/sql_elements001.htm#sthref135

misuk11
08-11-2005, 06:10 AM
unfortunately the database was migrated from Sybase and Im stuck with the underlying datatype so I cant change it to a timestamp.