Page 1 of 1

Default format for Oracle timestamp.

Posted: Wed Nov 25, 2009 7:33 am
by dhelsley
I'm using a DRS stage to read a timestamp column from Oracle 8i. By default the generated SQL uses TO_CHAR with the format "YYYY-MM-DD HH24:MI:SS".

To get the milliseconds I end up changing the type of these columns to VarChar and overriding the derivation with TO_CHAR(<col>, 'YYYY-MM-DD HH24:MI:SS.FF').

Is there a way to change the default so I don't need to override it every time?

Thank you.

Dave.

Posted: Wed Nov 25, 2009 7:55 am
by chulett
I don't recall 8i having TIMESTAMP data types but that doesn't change the answer - no, not that I'm aware of.

Posted: Wed Jan 27, 2010 9:39 pm
by kejuste
I GUESS THAT IS ONLY WAY YOU CAN EXTRACT MILLISECONDS. TO_CHAR(A.TABLE, 'YYYY-MM-DD HH24:MI:SS.FF')