Computing Elapsed Time With SPSS



Computing Elapsed Time With SPSS

[pic]

My colleague, Christyn Dolbier, asked me: “I am struggling with how to compute a variable for the time since an event took place. I have the data entered for the date (MM/DD/YY) the event took place and the date (MM/DD/YY) the participants completed the survey. What I want to compute is the amount of time since the event to the date they completed the survey. Do you know of a simple way to do this in SPSS?”

I tried to Google an answer to this, without success. Sometimes it is just easier to tinker and figure it out yourself. Here is what I discovered: If you want the elapsed number of days between one date and another, just do this:

[pic]

If you just tell SPSS to find the difference between two dates, it will report the answer in SECONDS, so you just divide by 86,400 to get the difference in days.

[pic]

Karl Wuensch, May, 2005.

Return to my SPSS Lessons Page.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download