Results 1 to 4 of 4

Thread: Timestamp

  1. #1
    Join Date
    Dec 2007
    Posts
    2

    Unanswered: Timestamp

    Hello,

    I am newbie.

    I have create some tables and columns. One thing bug me is timestamp data type.

    I use IBM DB2 Express-C.

    I looked up the table with control centre to see what length the TIMESTAMP is. The length is 10.

    Isnt TIMESTAMP format '2007-12-10.12.12.32.3234'?

    I got my insert data rejected because of that.

    What did i do wrong?

    Thanks

    M

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Welcome to the forum


    Moved to DB2 topic
    George
    Home | Blog

  3. #3
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    you have syntax error.

    You can write:
    2007-12-10-12.12.32.3234
    or
    2007-12-10-12.12.32.323400
    but not like you wrote:
    2007-12-10.12.12.32.3234

    Hope this helps,
    Grofaty

  4. #4
    Join Date
    May 2003
    Posts
    113
    " The length is 10." is for the internal binary format of timestamp. In another word, DB2 use 10 bytes to store a timestamp value. When display the value, the application and db2 usually show the string format which looks like '2007-....'. the string format takes 20 or so bytes(probably 26).

    Quote Originally Posted by darkyhorse
    Hello,

    I am newbie.

    I have create some tables and columns. One thing bug me is timestamp data type.

    I use IBM DB2 Express-C.

    I looked up the table with control centre to see what length the TIMESTAMP is. The length is 10.

    Isnt TIMESTAMP format '2007-12-10.12.12.32.3234'?

    I got my insert data rejected because of that.

    What did i do wrong?

    Thanks

    M

Posting Permissions

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