If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Date Datatype Limitaion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-19-10, 02:43
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
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
Reply With Quote
  #2 (permalink)  
Old 01-19-10, 03:21
tonkuma tonkuma is offline
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,193
In the manual "DB2 SQL Reference Volume 1"
Quote:
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.
Reply With Quote
  #3 (permalink)  
Old 01-20-10, 01:17
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
How to resolve this ??Any idea??
Reply With Quote
  #4 (permalink)  
Old 01-20-10, 02:21
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
  #5 (permalink)  
Old 01-20-10, 15:01
schintala schintala is offline
Registered User
 
Join Date: Apr 2005
Location: USA
Posts: 119
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.
Reply With Quote
  #6 (permalink)  
Old 01-20-10, 15:16
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
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
Reply With Quote
  #7 (permalink)  
Old 01-20-10, 15:28
dbzTHEdinosaur dbzTHEdinosaur is offline
Registered User
 
Join Date: Jun 2007
Location: germany
Posts: 96
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.
Reply With Quote
  #8 (permalink)  
Old 01-20-10, 17:18
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On