How to write a file with dyanmic naming using date and time

I am trying to write a log for each run of a pipeline and so I need to differentiate log files based on the time they were run. I am tyring to name them as a  FixedFilePathAndName + date + time using custom data manipulator.   First, I tried navigating to the folder and use filename of \\\$(@filename) as the file name but that created a file actually named \\\$(@filename).in the selected folder.  Next, I set the global  @filename with full path and filename included and then use this variable to configure the Excel writer Destination parameter set as  <\\\$(@filename)>. However, PP changes this to and I do not see a file with the name as I want to. I am sure somebody has done this before as this is quite common practice to automatically generate file names based on date/time.