Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2011

    Unanswered: How to get the timestamp differnce in microseconds


    I have to find the difference of timestamp values in microseconds.
    Is there any function available that does this job ?

    I have search for same, but got no luck.
    Thanks in advance.

  2. #2
    Join Date
    Apr 2006
    Provided Answers: 11
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5-V11 Fundamentals- DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

  3. #3
    Join Date
    Mar 2011

    Allready checked this link


    Thanks for the reply.
    I have allready checked the link. But there is nothing mentioned for microseconds there. It has shown function for getting difference in seconds.

    But I am not able to deduce function for finding the difference in microseconds.

    Can you help me?

  4. #4
    Join Date
    Jun 2007
    use 1 for the first arguement to the function TIMESTAMPDIFF which means microseconds.

    but, would also suggenst looking in the appropriate version of the sql reference for guidance.

    micorsecond results in microseconds + seconds + minutes (each of which is converted to microseconds.

    probably be better off, removing the hours and minutes portion which calculating invoking the function for microseconds.
    assuming that it is ALWAYS the same day,
    you would have one SQL, with several SETS, one for function 1, one for 2, one for 4 and one for 8,
    removing from each the micro/sec/min/hours.
    if you are confused, read the manual and try a few selects.
    Last edited by dbzTHEdinosaur; 09-26-11 at 10:13. Reason: spelling errors corrected.
    Dick Brenholtz, Ami in Deutschland

  5. #5
    Join Date
    Feb 2008
    Examples of microseconds difference are in here. (Not only milliseconds diff.)
    Number of milliseconds between two timestamps - IBM DB2

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts