I have a query set up in SQL Server agent to return an output result file. The problem I have is how to set a date and time stamp so that the file name always includes the date and time.
On the SQL Agent Job, I opened step and clicked on the "Advanced" tab, then I selected a file path where the output should be saved and that's all.