Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DateTime Conversion Error Expand / Collapse
Author
Message
Posted Thursday, December 19, 2013 12:01 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, April 03, 2014 10:57 PM
Points: 416, Visits: 512
Hi All.


I have a TABLE "TABLE1 " with column STARTDATE and Data Type DateTime2.
It has value of '0020-12-18 00:00:00.0000000'

Now when i m converting it to DATETIME , It is giving me this Error.
Can anyone tell me why.?
ERROR:The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.
Post #1524456
Posted Thursday, December 19, 2013 12:18 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, April 03, 2014 10:57 PM
Points: 416, Visits: 512
got the answer...
Problem is with DateTime.... It support till 1753...... and here in datetime2 we have 0020

Post #1524461
Posted Friday, December 20, 2013 1:08 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, April 07, 2014 7:35 AM
Points: 1,172, Visits: 2,413
Mr. Kapsicum (12/19/2013)
got the answer...
Problem is with DateTime.... It support till 1753...... and here in datetime2 we have 0020



So you have a date value for the Dec. 18 of the year 20 C.E. (Common Era; A.D. (Anno Domini - "Year of Our Lord") - is tres passe) in your database? Is that within the domain for that value, and if so, what is the application? An archaeology database?


Jason Wolfkill
Blog: SQLSouth
Twitter: @SQLSouth
Post #1525165
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse