SQL Convert Nvarchar(255) to DateTime problem
- by steven
Hi,
I'm using SQL server 2008.
I have 2 Tables: Table 1 and Table 2.
Table 1 has 1 column called: OldDate which is nvarchar(255), null
Table 2 has 1 column called: NewDate which is datetime, not null
Example data in Table 1:
26/07/03
NULL
NULL
23/07/2003
7/26/2003
NULL
28/07/03
When i try CAST(OldDate as datetime)
I get this error:
Arithmetic overflow error converting expression to data type datetime.
I need to insert OldDate into NewDate with no errors. I can't skip some rows.
Anyhelp would be appreciated.