Using SQL 2000 server I've managed to convert a number (20100514) to a string (14/05/2010) using the following:
Right(Convert(VarChar, {Field}, 103),2) + '/' + Substring(Convert(VarChar, {Field}, 103), 5, 2) + '/' + Left(Convert(VarChar, {Field}, 103),4) as OMD
I now need to convert this string into a date format but what ever I've tried doesn't work. I've tried using cast and convert but they don't seem to work.
Does anyone have any ideas.
Many thanks
Stuart
Right(Convert(VarChar, {Field}, 103),2) + '/' + Substring(Convert(VarChar, {Field}, 103), 5, 2) + '/' + Left(Convert(VarChar, {Field}, 103),4) as OMD
I now need to convert this string into a date format but what ever I've tried doesn't work. I've tried using cast and convert but they don't seem to work.
Does anyone have any ideas.
Many thanks
Stuart