robert030975
MIS
- Oct 17, 2006
- 227
For some reason I seem to have issues with date conversion any way
A table on that is populated by a service as a varchar column called import_date! I have built a SSIS package transferring one table on a different server to another however I would like to use the datadiff on the import date and stop me having to truncate the receving table but when I do this
SELECT *
FROM i_bossdayends
WHERE (DATEDIFF(DAY,GETDATE(), Cast (import_date as datetime))) = 0
Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
(0 row(s) affected)
would i need to use isdate with a subquery??
A table on that is populated by a service as a varchar column called import_date! I have built a SSIS package transferring one table on a different server to another however I would like to use the datadiff on the import date and stop me having to truncate the receving table but when I do this
SELECT *
FROM i_bossdayends
WHERE (DATEDIFF(DAY,GETDATE(), Cast (import_date as datetime))) = 0
Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
(0 row(s) affected)
would i need to use isdate with a subquery??