View Full Version : SPSS Syntax and Date in File Name


Therese
01-30-2007, 12:14 PM
Hello Everyone - this may be a simple question, but I am struggling to find the answer. I have a syntax file that I inport a file from Excel, do some manipulations and then save the file. I am trying to save the file with the current date as part of the name. Here are my issues: when i have
SAVE OUTFILE='h:\file name.sav'. It works fine. I also have a macro with the common path because I do this several times, so when I have SAVE OUTFILE=!Path1+"name.sav". It works fine. So I thought I was smart and have a macro for todays date. However, if I have SAVE OUTFILE='h:name'+!date+'.sav'. Where !date calls for todays date. The system keeps giving me errors about the + signs. Does anyone know how to connect these without plus signs? It doesn't seem to mind the plus sign in the second example above. Any help is greatly appreciated.

Therese

Therese
01-30-2007, 01:17 PM
I figured it out. The problem was not with the "+" signs but with how I was defining my macro. It all works now. Thanks anyway.

Therese