Thank you Gene


For example


If the interview started at 4 pm and ended at 5:10 pm then the start time variable 'STM' = 1600 and the end time variable 'ETM' = 1710 My question is how to calculate the time duration between the start time STM and the end time ETM and to put the results in a new variable for duration 'DUR'


Hope its more clear now






From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Gene Maguin
Sent: Wednesday, April 20, 2011 04:46 PM
Subject: Re: time calculation




Are STM and ETM time formatted variables, i.e., Time5 or Time8?  I think you should be able to do a simple subtraction:

compute dur=etm-stm. Do you format dur as Time5 or Time8?


But are there instances were stm is the next day?


I get it that you are having trouble, but what kind of trouble are you having. I can get the wizard to do what i think you want it to do.


Gene Maguin



From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Mohd Aayed
Sent: Wednesday, April 20, 2011 7:21 AM
Subject: time calculation

Dear list


I have to variables among a dataset

One is for the interview start time “STM”

The other is for the interview end time “ETM”

The time format is entered as 4 digits – 24 hours format

I need to calculate the interview duration IN MINUTES based on the start and end time, and the results to be in a new variable “DUR”


I tried the time/date wizard in IBM SPSS 19 but I couldn’t find options for timing there


Thanks in advance