Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2009
    Posts
    153

    Unanswered: Date Datatype Limitaion

    Hi Experts,

    Is there any limitation for DB2 in showing dates less than 01-01-1940 in DB2.

    We are getting NULL values through application for dates less than 01-01-1940 and higher than 2039-12-31

    TIA

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    In the manual "DB2 SQL Reference Volume 1"
    A date is a three-part value (year, month, and day). The range of the year part is
    0001 to 9999. The range of the month part is 1 to 12. The range of the day part is 1
    to x, where x depends on the month.

  3. #3
    Join Date
    Jan 2009
    Posts
    153
    How to resolve this ??Any idea??

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    I'd say that your application has a problem and you need to fix it there.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  5. #5
    Join Date
    Apr 2005
    Location
    USA
    Posts
    130
    There is no such date range limitation in accepting the data data type in DB2. Some thing to do with the application code. Take a look into it closely.

  6. #6
    Join Date
    Jul 2009
    Location
    NY
    Posts
    963

    Thumbs down

    Quote Originally Posted by ratheeshknair View Post
    Hi Experts,

    Is there any limitation for DB2 in showing dates less than 01-01-1940 in DB2.

    We are getting NULL values through application for dates less than 01-01-1940 and higher than 2039-12-31

    TIA
    Show your query, please....

    Nulls are not possible in any case....

    Lenny

  7. #7
    Join Date
    Jun 2007
    Location
    germany
    Posts
    155
    more important,
    show the create table statement and the system defaults for your date column,
    the INSERT SQL used to add a row,
    and any UPDATE SQL against the column.

  8. #8
    Join Date
    Jul 2009
    Location
    NY
    Posts
    963

    Lightbulb

    Quote Originally Posted by dbzTHEdinosaur View Post
    more important,
    show the create table statement and the system defaults for your date column,
    the INSERT SQL used to add a row,
    and any UPDATE SQL against the column.
    Agree with you ! Something wrong...

    Lenny

Posting Permissions

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