Re: converting from varchar to datetime
From: Joseph Dixon (joseph_dixon_at_hotmail.com)
Date: 06/27/04
- Next message: Brian Henry: "Re: stored proc code always returns null?"
- Previous message: Dan Guzman: "Re: Testing Table Existence - DB name as variable ?"
- Maybe in reply to: Alex Ivascu: "Re: converting from varchar to datetime"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 27 Jun 2004 11:25:34 -0700
I Have just ran into the same problem converting a nvarchar to
datetime.. The following may help..
--------------------------------
From: Joseph Dixon
I don't know if this is still relevent to what you are working on, but I
also recieved this message.
This error message indicates that one of your date fields date is not
consistant with date values, And the SQL server is having problems
converting what should be in date format to a date.
:::::::::PROBLEM:::::::::
Example of incorrect information in your datebase:
wrong: 2/200/4
wrong: 2/2/204
The SQL server will read these dates as Arithmatic operations, instead
of dates, and will generate this error.
Arithmetic overflow error converting expression to data type datetime.
The statement has been terminated.
::::::::RESOLUTION:::::::
If you understand this you know that you have some cleanup to do on your
data before you convert to datetime. Look for fields that have incorrect
formats. I exported to MS access and worked with the data from their
thats how I discovered the problem.
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Brian Henry: "Re: stored proc code always returns null?"
- Previous message: Dan Guzman: "Re: Testing Table Existence - DB name as variable ?"
- Maybe in reply to: Alex Ivascu: "Re: converting from varchar to datetime"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|