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 (May 2010)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 14 May 2010 08:22:08 -0700
Reply-To:     Bruce Weaver <bruce.weaver@hotmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Bruce Weaver <bruce.weaver@hotmail.com>
Subject:      Re: More help
In-Reply-To:  <AANLkTiks9YRj-ozK8bIuD5zRQD4KCiLqN5E8mYVPP5z7@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii

Khaleel Hussaini wrote: > > I have the following data > child1_dob child2_dob child3_dob child4_dob momDOB > 01/10/2009 05/04/1990 07/08/2000 . 05/05/1975 > 02/13/2008 04/03/2007 05/06/1999 09/07/1998 04/04/1985 > > The objective is to find mom's age at the birth of first child. How can I > develop an elegant syntax for such comparison? > >

Use the MIN function to pick out the earliest DOB among the children. E.g.,

numeric first_child_dob (date11). compute first_child_dob = min(child1_dob to child4_dob).

Then use FIRST_CHILD_DOB and MOMDOB as arguements in DATEDIFF to compute the mother's age.

----- -- Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- View this message in context: http://old.nabble.com/More-help-tp28560342p28560761.html Sent from the SPSSX Discussion mailing list archive at Nabble.com.

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


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