First, you can’t.
Sysdate doesn’t support going to milliseconds. However, starting with Oracle 9, you can getting milliseconds from another system source : SYSTIMESTAMP.
SELECT to_char(sysdate, 'HH24:MI:SS'), to_char(systimestamp, 'HH24:MI:SS.FF6') FROM dual;
Powered by Qumana
Advertisement
Can u please eloberate as what exactly is FF6 / FF5 will return? And if you substract one systimestamp datatype from other, what it will return and what will be the output datatype?
Comment by Phani Kumar — March 30, 2007 @ 6:31 am
select to_timestamp(to_char(systimestamp(3),’YYYY-MM-DD HH24:MI:SS:FF3′),”) from dual
can this display result in format ‘YYYY-MM-DD HH24:MI:SS:FF3′ anyway i want result in time stamp data type only and in this format for inserting it into tables
Comment by piyush — February 7, 2008 @ 10:55 am
I actually moved my Blog to http://jasonvogel.blogspot.com/2006/11/example-using-systimestamp-milliseconds.html. The version at this URL is up to date, and includes at least some of what you’re looking for.
Jason
Comment by jasonvogel — February 7, 2008 @ 3:35 pm