Declare @path Varchar(200)
set @path='xxxx'+ CONVERT(VARCHAR(10),GETDATE(),110)+'.bak'
BACKUP DATABASE [xxxx]
TO DISK = @path
So, what is your question or problem?
The code above does work well even with a space in the path. The only thing to keep in mind is to add a backslash at the end of the path. Because you entered a dummy value in your post I'm not sure you have done that.
** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **