Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert char to datetime

Status
Not open for further replies.

georgia51390

Programmer
May 17, 2001
13
US
I am trying to convert a column in my table that contains dates in this format: 5/21/01. Could someone give me the correct syntax to convert the datatype from char to datetime? I keep getting the error
"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value."
 
It sounds like at least one of your date values are invalid. Check your data and be sure all values have a valid month, day and year. Also - if you are converting to smalldatetime, there are date limitations. Smalldatetime must be between January 1, 1900, and June 6, 2079.
 
Thanks, that is probably what it is. . . I am running a script to check that now. . . THANKS!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top