• I've sorted it. I originally tried to use 'REPLACE' but couldn't get the syntax right, so I used SUBSTRING instead,

    SUBSTRING( @Yesterday, 1, 4 ) + SUBSTRING( @Yesterday, 6, 2 ) +SUBSTRING( @Yesterday, 9, 2 )

    Thanks for all your help