• Hi,

    Try this instead, works just as well. Basically I insert a space between the Date and the time and a : between the hours and the minutes

    declare @DtStr varchar(20)

    set @DtStr='200907011020'

    select convert(datetime,substring(@DtStr,1,8)+' '+substring(@DtStr,9,2)+':'+substring(@DtStr,11,2))