SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DateTime Conversion Error


DateTime Conversion Error

Author
Message
Mr. Kapsicum
Mr. Kapsicum
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1171 Visits: 1028
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.
Mr. Kapsicum
Mr. Kapsicum
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1171 Visits: 1028
got the answer...
Problem is with DateTime.... It support till 1753...... and here in datetime2 we have 0020

:-)
wolfkillj
wolfkillj
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1468 Visits: 2582
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search