pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #5637] Implement DATESUM, DATEDIFF expression function


From: Daniel E WILLIAMS
Subject: Re: [patch #5637] Implement DATESUM, DATEDIFF expression function
Date: Mon, 18 Dec 2006 08:27:37 -0800

Ben,
 
The time of day appears to count for DATEDIFF.  The difference in years between 1 Jan 2004
at 2pm and 1 Jan 2005 at 1pm equals zero, while the difference in years between 1 Jan 2004
at 2pm and 1 Jan 2005 at 3pm equals one.
 
Time of day also appears to count for DATESUM.  1 Feb at 14:00, with one month added, becomes 1 Mar at 14:00.  The code I sent tries three different versions of DATESUM; the default, "rollover", and "closest" methods.  I cannot figure out what the difference between "rollover" and "closest", but I know that "closest" is the default.
 
You are right.  The SPSS documentation is not very clear on this issue.  I've attached code and an output file that shows the calculations I made.  Thanks.
 
Dan Williams
Forecasting, Research and Analysis Office
Department of Human Services
State of Oregon, USA
503 947 5354

Attachment: date_stuff_for_SPSS.SPS
Description: Binary data

Attachment: date_stuff_for_SPSS.sav
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]