help!
I have a current field that is stored as a varchar(500), users enter dates into this field. I need to convert the field to an english date but I am having problems, any ideas would be greatly appreciated....
values when selected in query analyser are shown as
2006/07/02 15:20:00
if I try and run the following convert statement
convert(smalldatetime, Value, 103) Value2
i get an error
Server: Msg 296, Level 16, State 3, Line 1
The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
i tried another conversion of
convert(SMALLDATETIME,SUBSTRING(VALUE,9,2) + SUBSTRING (VALUE,5,4)+ SUBSTRING (VALUE,1,4)+SUBSTRING (VALUE,11,9),103) Value2
but i get the following results
2006-07-02 15:20:00
so i still cant use this in my where statement when tryin to put in english date formats
any ideas????
I have a current field that is stored as a varchar(500), users enter dates into this field. I need to convert the field to an english date but I am having problems, any ideas would be greatly appreciated....
values when selected in query analyser are shown as
2006/07/02 15:20:00
if I try and run the following convert statement
convert(smalldatetime, Value, 103) Value2
i get an error
Server: Msg 296, Level 16, State 3, Line 1
The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
i tried another conversion of
convert(SMALLDATETIME,SUBSTRING(VALUE,9,2) + SUBSTRING (VALUE,5,4)+ SUBSTRING (VALUE,1,4)+SUBSTRING (VALUE,11,9),103) Value2
but i get the following results
2006-07-02 15:20:00
so i still cant use this in my where statement when tryin to put in english date formats
any ideas????