Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Compute dates
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alicia Booth  
View profile  
 More options Mar 3 1998, 3:00 am
Newsgroups: comp.soft-sys.stat.spss
From: Alicia Booth <abo...@UCSD.EDU>
Date: 1998/03/03
Subject: Compute dates

I have a date variable and I need to compute another variable in which the
month and day are the same but the year is one year later. I could try
extracting month, day and year using the 'xdate.month(date),
xdate.mday(date), xdate.year(date)' functions, but this would be very time
consuming because I need to process many dates in the same fashion. Besides
I would be left with the dates split in three numeric fields and I need it
in date format. Is there a simple way of doing what I need to do?

I have this   '02/03/98' and

I need this   '02/03/99'

I would appreciate it if you could respond to me directly since right now I
am not a member of the List Serve. Thank you in advance for your help.

Alicia Booth


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Mark Marso  
View profile  
 More options Mar 3 1998, 3:00 am
Newsgroups: comp.soft-sys.stat.spss
From: David Mark Marso <ma...@spss.com>
Date: 1998/03/03
Subject: Re: Compute dates

* Add one year to a date * .
DATA LIST / date1 1-10 (ADATE) date2 12-21 (ADATE).
BEGIN DATA
02/09/1997 03/09/1996
12/09/1997 05/21/1996
END DATA .

DO REPEAT NEWDATE=NDATE1 NDATE2 / OLDDATE=date1 date2.
COMPUTE NEWDATE=DATE.MDY(XDATE.MONTH(olddate),
                         XDATE.MDAY(olddate),
                         XDATE.YEAR(olddate)+1).
FORMATS NEWDATE (ADATE10).
END REPEAT.
LIST.

David Marso


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »