LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2004)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 24 May 2004 10:40:14 -0400
Reply-To:     Raynald Levesque <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Raynald Levesque <>
Subject:      Re: Filename with date
In-Reply-To:  <>
Content-type: text/plain; charset=US-ASCII


This is one way:

* Objective: Save data file with the current date as part of the name. * Define dummy data . DATA LIST FREE /a. BEGIN DATA 1 2 3 END DATA.

* Define a macro which will yield the current date. STRING #cdate(A9). COMPUTE #cdate=$DATE. DO IF $casenum=1. WRITE OUTFILE 'c:\temp\temp.sps' /"DEFINE !date()'"#cdate"'!ENDDEFINE.". END IF. EXECUTE. * Run the macro. INCLUDE 'c:\temp\temp.sps'.

SAVE OUTFILE='c:\temp\example1_' + !date + '.sav'.


Raynald Levesque Visit my SPSS site:

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of studentSPSS Sent: May 24, 2004 9:23 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Filename with date

Hi everybody, I want just to save a .sav with the current system date.

For example, I want to save "example1_24_may_2004.sav" (or some other date format)

The parameters could be also the name before the date (example1)

Any suggestion about the solution would be greatly appreciated.


spssStudent Italy

Back to: Top of message | Previous page | Main SPSSX-L page