Date: Fri, 15 Feb 2008 14:55:24 -0600
Reply-To: "Marks, Jim" <Jim.Marks@lodgenet.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Marks, Jim" <Jim.Marks@lodgenet.com>
Subject: Re: Computing time spent
In-Reply-To: A<47B5A4D4020000AA0005FCBC@gwial1.it.luc.edu>
Content-Type: text/plain; charset="US-ASCII"
Sara:
COMPUTE timegap =End_time - start_time.
gives the difference in seconds. You can calculate up to larger
intervals-- 86,400 seconds per day for e.g.
Or you can use DATEDIFF to get standard date units.
COMPUTE timegap = DATEDIFF(end_time,start_time,"months").
the help file says valid date units are
Years
Quarters
Months
Weeks
Days
Hours
Minutes
Seconds
HTH
--jim
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Sara House
Sent: Friday, February 15, 2008 2:42 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Computing time spent
Hey everyone -
This is probably easy to do but I seem to be stumped (it is Friday after
all). I have a variable of start time on a task and another variable
that is finish time. I want to compute how much time they spent on the
task from these variables. How would I do this? I would prefer syntax
but I'll take what I can get.
Sara House
shouse1@luc.edu
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list
of commands to manage subscriptions, send the command INFO REFCARD
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD