Dear guys
I want to backup a SQL Server database with C#. I have written a stored procedure which backup the database:
CREATE PROCEDURE WINC_BackupDatabase
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
BACKUP DATABASE WINC_kentico
TO DISK = 'G:\MSSQL10.MSSQLSERVER\MSSQL\Backup\WINC_kentico_' + NOW() + '.bak'
WITH NOINIT
END
GO
In line 10 I set the path for the backup. I want to add the current DateTime at the end of the file name. How is the syntax to set a DataTime at the end of the file name?
Best regards