Skip to Main Content

APEX

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!

Remove TIMESTAMP millisecond precision for display

545791Mar 11 2007 — edited Nov 30 2012
Hi

I have a table which contains a TIMESTAMP field. I want to display the contents of that field but only to seconds precision, ie lopping off the milliseconds, however I cannot seem to be able to engineer it.
In the SOURCE section for the field I have to_char(P30_NOTE_CREATED,'DD-MON-YYYY HH24:MI:SS')
In the DEFAULT section I have[b] TO_CHAR(SYSTIMESTAMP, 'DD-MON-YYYY HH24:MI:SS')
Also, the field itself is dervied from a query in the PROCESS section, run On Load- Before Header where I am selecting to_char(note_created,'DD-MON-YYYY HH24:MI:SS')

What happens is when there is no record has been selected, the defualt to the current systime displays without milliseconds. However, when I do select a record, the timestamp field is displayed with milliseconds.

I could alter the nls_timestamp format for the session, but that seems a bit of a sledgehammer-to-crack-a-nut solution. Alternatively, of course, I could just change the TIMESTAMP firled to be a DATE field which would still give me the second precision and I'm debating that at the moment, but having set the field as a timestamp, it is now bugging me why I can't get it to display just to seconds.



Regards

Jon
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 28 2012
Added on Mar 11 2007
4 comments
17,633 views