Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

timestamp in output?

716 views
Skip to first unread message

Frank Stetzer

unread,
Jan 14, 2004, 12:13:05 PM1/14/04
to
This must be a FAQ but I can't find it on the SPSS website or Help...

How do I include a timestamp in the output window?

========================================================================
Frank Stetzer, Ph.D. ste...@uwm.edu
Research Support P.O. Box 413
Information and Media Technologies Milwaukee, WI 53201
University of Wisconsin - Milwaukee (414)-229-4571


Bruce Weaver

unread,
Jan 14, 2004, 1:15:09 PM1/14/04
to

If you mean in a header or footer, i don't know. But if you
just want the date to appear somewhere in the output, try this:

* ------------------------ .
* Show today's date .
* ------------------------ .
compute today = $time.
exe.
formats today (date).
means today /cell = mean.
* ------------------------ .

It's not terribly elegant, but it works!

Cheers,
Bruce
--
Bruce Weaver
wea...@mcmaster.ca
www.angelfire.com/wv/bwhomedir/

Chris R

unread,
Jan 15, 2004, 9:17:24 AM1/15/04
to

Ingenuous, but there's an easier way.

Run some procedure, so you have an output-file.
Go to this output-file and then:
-File
-Page-setup
-Options
-Header/Footer
Add -by clicking the symbol(s)- the date, and if you like, the time too) to
the standard-header.
Click "Make default"
SPSS (at least my version:11) will retain this setting over sessions.

chris

Bruce Weaver

unread,
Jan 15, 2004, 9:50:56 AM1/15/04
to
Chris R wrote:
> In article <bu4102$a7g$1...@informer1.cis.mcmaster.ca>, Bruce Weaver <wea...@mcmaster.ca> wrote:
>
>>Frank Stetzer wrote:
>>
>>>This must be a FAQ but I can't find it on the SPSS website or Help...
>>>
>>>How do I include a timestamp in the output window?
>>>

>>


>>If you mean in a header or footer, i don't know. But if you
>>just want the date to appear somewhere in the output, try this:
>>
>>* ------------------------ .
>>* Show today's date .
>>* ------------------------ .
>>compute today = $time.
>>exe.
>>formats today (date).
>>means today /cell = mean.
>>* ------------------------ .
>>
>>It's not terribly elegant, but it works!
>
>
> Ingenuous, but there's an easier way.
>
> Run some procedure, so you have an output-file.
> Go to this output-file and then:
> -File
> -Page-setup
> -Options
> -Header/Footer
> Add -by clicking the symbol(s)- the date, and if you like, the time too) to
> the standard-header.
> Click "Make default"
> SPSS (at least my version:11) will retain this setting over sessions.
>
> chris
>

Thanks Chris. Just one comment: That method looks great,
provided people are viewing the Output using SPSS. More
often than not, though, I produce output for people who do
not have SPSS no their machine. So I end up pasting the
output into Word or PowerPoint for them. And in this case,
I think the Output viewer headers and footers would be lost.

Ryan

unread,
Jan 15, 2004, 3:07:15 PM1/15/04
to
> * ------------------------ .
> * Show today's date .
> * ------------------------ .
> compute today = $time.
> exe.
> formats today (date).
> means today /cell = mean.
> * ------------------------ .


I sometimes want timestamps in my output b/c I want to know how long
it takes to run a block of syntax. If you are working with massive
data sets, the problem with Bruce's solution is that it requires the
creation of an extra field and an extra data pass. You can get around
this sometimes by opening another small file and running Bruce's
syntax above. But you can only do this after a SAVE command because
opening another data file will obviously overwrite your working file.

I haven't found a way to insert timestamps into output without a data
pass. Has anyone else?

Chris R

unread,
Jan 16, 2004, 7:37:48 AM1/16/04
to

ACK. The date/time-stamp isn't (part of) the 'pure' SPSS-output. It's
something that's 'added' to the output-file (by the program that handles the
file), just like the header/footer of Notepad-files.
I was simply presuming the whole process takes place 'within' SPSS.

chris

Ryan

unread,
Jan 16, 2004, 2:08:31 PM1/16/04
to
> I haven't found a way to insert timestamps into output without a data
> pass. Has anyone else?

Posting on Google with delay, so I apologize if someone already
replied. But I just figured out an answer to my own question. If you
run the DISPLAY command, with any of the available keywords (e.g.
DISPLAY scratch.), the current date/time will appear in the Notes
section of the output. DISPLAY does not require a data pass.

Neila Nessa

unread,
Jan 16, 2004, 5:05:24 PM1/16/04
to
Do If $CASENUM=1
COMPUTE Print / $TIME .
End If
...
Your first proc will push the date into the output.
Also you could use Scripting to do this.
Neila

rya...@metacrawler.com (Ryan) wrote in message news:<ed017e7a.04011...@posting.google.com>...

0 new messages