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 (January 1997)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 14 Jan 1997 17:17:16 -0600
Reply-To:     marso@spss.com
Sender:       "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From:         David Marso <marso@SPSS.COM>
Organization: SPSS Inc
Subject:      Re: compute # of weeks & years from date variables
Content-Type: text/plain; charset=us-ascii

* Weeks:. Compute week1 = CTIME.DAYS(date2-date1)/7. Compute week2 = CTIME.HOURS(date2-date1)*168. Compute week3 = CTIME.MINUTES(date2-date1)*10080.

* Years:. Compute Years = CTIME.DAYS(date2-date1)/365.25.

The question might be is there a "simple" function to do this? Answer : No.

After reflection and before hitting send button :) Maybe the question is years and weeks? Like an age in years and weeks ?

* the sequence returns two variables number of years and remainder weeks:*. Compute Weeks=Ctime.Days(date2-date1)/7. Compute Years=Trunc(Weeks/52). Compute Weeks=Mod(Weeks,52).

Regards, David Marso

Ling Ting wrote: > > Hi, all: > > I would like to know if there is a function to > compute the number of weeks and years between two dates? > Thanks in advance! > > Ling Ting


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