Jason Vogel – Blog

September 22, 2006

Oracle and getting Milliseconds from Sysdate… [Systimestamp]

Filed under: Oracle — jasonvogel @ 9:52 pm

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

3 Comments »

  1. 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

  2. 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

  3. 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


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.