CooLDBA (2/11/2010)
CREATE TABLE [dbo].[_CalendarDate]([F1] [varchar](20) NULL
) ON [PRIMARY]
select * from dbo._CalendarDate
8242004
8252004
8262004
select CONVERT(datetime, F1, 103) from _CalendarDate
Syntax error converting datetime from character string.
I want to convert it to datetime, any idea?
Hard to say. Looks like the dates are in mmddyyyy format, but potentially with no leading zeros. If there are no leading zeros in the DD portion, it could be problematic. From your sample data, I have no clue.