How can I convert a varchar field of the form YYYYMMDD to a datetime in T-SQL?
Thank you.
select convert(datetime, '20081030')
Use the CONVERT() function?
http://msdn.microsoft.com/en-us/library/ms187928.aspx