This script works on Azure SQL Database also.
DECLARE @cmd nvarchar(255) SET @cmd = N'CREATE DATABASE ' + CONCAT('MyDB_', REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR(16), GETDATE(), 120), '-', ''),':',''),' ','_')) + ' AS COPY OF MyDB' EXECUTE sp_executesql @cmd