Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    6

    Unanswered: Need Syntax help for timestamp YYYY-MM-DD-HH.MM.SS.ssssss!!

    Thanks in adavance for looking into my post.

    I need some help to write help to write a syntax in sql for Db2 that would give me a timestamp

    of the following format...

    YYYY-MM-DD-HH.MM.SS.ssssss

    I need the 100th part of the second as i am trying to measure query execution time.

    Will apprecite all suggestions, i am working Windows OS and Db2 8.1.3.
    Last edited by satish_nath; 04-17-04 at 15:47.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Need Syntax help for timestamp YYYY-MM-DD-HH.MM.SS.ssssss!!

    $ db2 "values(current timestamp,microsecond(current timestamp)) "

    1 2
    -------------------------- -----------
    2004-04-17-21.04.21.746995 746995

    1 record(s) selected.

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2004
    Location
    Tallahassee, FL, USA
    Posts
    96
    to handled timestamp in db2

    use following functions

    TIMESTAMP

    TIMESTAMP(START_DATE)

    TIMESTAMP_FORMAT


    use above functions


    Let me know, if any questions.


    lekharaju Ennam
    Certified Oracle8i & DB2 UDB DBA

  4. #4
    Join Date
    Dec 2003
    Posts
    6

    Thanks for Help!!! Solved my Problem.

    Originally posted by famudba
    to handled timestamp in db2

    use following functions

    TIMESTAMP

    TIMESTAMP(START_DATE)

    TIMESTAMP_FORMAT


    use above functions


    Let me know, if any questions.


    lekharaju Ennam
    Certified Oracle8i & DB2 UDB DBA

Posting Permissions

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