As Sylvain mentioned you could use the CONVERT() or CAST() funciton. SQL Server is also capable of implicitly converting a string to a datetime datatype.
You should also checkout the SET DATEFORMAT connection setting. It could affect the converstion. For the best results, format the string as YYYYMMDD. SQL Server will always recognize this format and convert it properly.
-Mike