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 (September 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 29 Sep 2003 13:31:55 +0200
Reply-To:     Juanan Amunategui <jamunategui@caritasbi.org>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Juanan Amunategui <jamunategui@caritasbi.org>
Subject:      Re: Dates and length of period
Comments: To: Paul Hover <pfhover2@yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Paul,

Use this command:

COMPUTE days = CTIME.DAYS(date2 - date1) . EXECUTE .

Juanan Amunategui -----Mensaje original----- De: Paul Hover [mailto:pfhover2@yahoo.com] Enviado el: lunes, 29 de septiembre de 2003 13:10 Para: SPSSX-L@LISTSERV.UGA.EDU Asunto: Dates and length of period

Dear all,

I have a database with 2 data-variables: date1 and date2. I would like to calculate the length of the period in days between date1 and date2. The number of days should be a new variable. e.g.: the length of the period between date1 and date2 for respondent 1 is 35 days. This is the simplified database:

data list free / resp (f2.0) date1 (edate8) date2 (edate8).

begin data

1 06.07.03 10.08.03

2 25.07.03 14.08.03

3 18.05.03 23.09.03

4 01.06.03 05.07.03

end data.

Can anyone help me out? Many thanks in advance!

Paul Hover

--------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search


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