is it 06/20/2006 or 06/01/2006?
One of those should work. They are primitive but as long as you can goarantee the input format to be always 6 chars then you should be fine
DECLARE @StringDate CHAR(6)
SET @StringDate = '062006'
DECLARE @Date DATETIME
SELECT CONVERT(DATETIME, LEFT(@StringDate,2) + '/' + SUBSTRING(@StringDate,3,2) + '/' + RIGHT(@StringDate,2), 1)
DECLARE @StringDate CHAR(6)
SET @StringDate = '062006'
DECLARE @Date DATETIME
SELECT CONVERT(DATETIME, LEFT(@StringDate,2) + '/01/' + RIGHT(@StringDate,4), 101)
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]