Results 1 to 3 of 3

Thread: Timestamp

  1. #1
    Join Date
    Oct 2002
    Posts
    16

    Unanswered: Timestamp

    I defined a timestamp column and had problem insertting the values. I have tried this format:
    1/1/2003 0:00:00 and 2003-01-01-00.00.00.000000
    and got the error "sql0104N"

    What would be the correct data format of timestamp column?

    Thanks!

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I would let DB2 do the hard work. Use the TIMESTAMP function:

    Insert into mytable (timestampcolumn, ...) values (timestamp('01/01/2003','00:00:00'), ...

    HTH
    Andy

  3. #3
    Join Date
    Feb 2002
    Location
    Germany
    Posts
    141
    Alex,

    I think that with SQL0104N you're problem isn't in the timestamp format. You have a syntax error!
    The timestamp format you informed is correct:
    'JJJJ-MM-TT-HH.MM.SS.MMMMMM' (as String)

    HTH.
    Rodney Krick

Posting Permissions

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