Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2005

    Unanswered: End of Time Timestame

    I am trying to insert 9999-12-31-23.59.999999 into timestam column and get the following error.

    INSERT INTO myDBName.table(...,ACTL_LDG_CTOF_TMST, ) VALUES (...,TIMESTAMP('9999-12-31-23.59.999999')

    15:33:01 [INSERT - 0 row(s), 0.015 secs] [Error Code: -181, SQL State: 22007] THE STRING REPRESENTATION OF A DATETIME VALUE IS NOT A VALID DATETIME VALUE
    ... 1 statement(s) executed, 0 row(s) affected, database exec time 0.015 sec [0 successful, 0 warnings, 1 errors]

    does any know what i need to do here?


  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    Quote Originally Posted by leemjesse

    does any know what i need to do here?
    You need to double-check the format of your timestamp string, as the message says. Try to parse it yourself and check if all components are there.
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Apr 2002
    Toronto, Canada
    maybe it's an overflow

    try using '9999-12-31 23.59'

    this should work just as nicely as your end-of-time value, and will only fail if the query should happen to be executing in the last few microseconds of that particular day... and i'll bet you won't notice | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Jan 2003
    Provided Answers: 5
    As n_i said, take a good look at the format. I see year, month, day, hours, minutes, and fraction seconds but no seconds...


Posting Permissions

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