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 (December 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 12 Dec 2003 11:17:22 +0100
Reply-To:     Asesoría Bioestadística
              <bioestadistica@eresmas.net>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Asesoría Bioestadística
              <bioestadistica@eresmas.net>
Subject:      Re: number of months between two dates
Content-Type: text/plain; charset=iso-8859-1

Hola Vicent:

Does this do what you need?

DATA LIST LIST /FCAL(DATE11). BEGIN DATA 30-11-2000 25-12-1999 30-05-2001 END DATA.

COMPUTE months=TRUNC((CTIME.DAYS(DATE.DMY(31,10,2002)-fcal))/30.4375) . EXECUTE . FORMAT months(F8.0).

Saludos desde Pamplona

Marta García-Granero

Vicent Giner i Bosch ha escrito:

> I have one variable called "fcAl" which contains DATE datas. > > I want to create another variable called "mfcAl" containing number of months > between "fcAl" and 31rd-OCTOBER-2002. > > How can I do it? I gess it's quite easy, but I don't manage very well with > SPSS date functions. > > Thank you in advance. :-) > > ........................................ > > Vicent Giner i Bosch > vigibos@eio.upv.es > http://ttt.upv.es/~vigibos > > Universitat Politècnica de València > Departament d'Estadística i Investigació > Operativa Aplicades i Qualitat > Edifici I-3 > Camí de Vera, s/n > 46022 VALÈNCIA > - S P A I N - > > Tel.: +34 963877007 Ext.: 74948 > ........................................


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