|
In case you're not already aware, I've just come across an interesting bug affecting the display of dates in SPSS:
Instead of issuing an error message SPSS displays a wrong date when calculating date variables from incorrect input data in months with fewer than 31 days: Dates that to not exist at the end of a month are 'shifted' to the beginning of the next month (e.g. "February 31" is displayed as "March 2" in leap years and as "March 3" in non-leap years. I've tested this in SPSS versions 15 and 18, and the results were the same. Just try the following syntax: data list free / day month year. begin data. 30,02,2008 31,02,2008 29,02,2010 30,02,2010 31,02,2010 31,04,2010 31,06,2010 31,09,2010 31,11,2010 end data. comp date=date.dmy(day,month,year). form date (edate10) / day,month (f2.0) / year (f4.0). list day,month,year,date. -- Andreas Völp Psy Consult Scientific Services Frankfurt, Germany |
|
You have posted this comment to two SPSS lists, but I would like to call your attention to this text from the Command Syntax Reference and the help. Functions that contain a day argument—for example, DATE.DMY(d,m,y)—check the validity of the argument. The value for day must be an integer between 1 and 31. If an invalid value is encountered, a warning is displayed and the value is set to system-missing. However, if the day value is invalid for a particular month—for example, 31 in September, April, June, and November or 29 through 31 for February in nonleap years—the resulting date is placed in the next month. For example DATE.DMY(31, 9, 2006) returns the date value for October 1, 2006. ForYRMODA, it says The day can range from 0 through 31. Day 0 is the last day of the previous month regardless of whether it is 28, 29, 30, or 31. For example, YRMODA(1990,3,0) yields 148791.00, the day number for February 28, 1990. For DATESUM, "method" is an optional specification for variable-length units (years, quarters, months) enclosed in quotes. The method can be "rollover" or "closest". The rollover method advances excess days into the next month. The closest method uses the closest legitimate date within the month. This is the default. Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
In case you're not already aware, I've just come across an interesting bug affecting the display of dates in SPSS: Instead of issuing an error message SPSS displays a wrong date when calculating date variables from incorrect input data in months with fewer than 31 days: Dates that to not exist at the end of a month are 'shifted' to the beginning of the next month (e.g. "February 31" is displayed as "March 2" in leap years and as "March 3" in non-leap years. I've tested this in SPSS versions 15 and 18, and the results were the same. Just try the following syntax: data list free / day month year. begin data. 30,02,2008 31,02,2008 29,02,2010 30,02,2010 31,02,2010 31,04,2010 31,06,2010 31,09,2010 31,11,2010 end data. comp date=date.dmy(day,month,year). form date (edate10) / day,month (f2.0) / year (f4.0). list day,month,year,date. -- Andreas Völp Psy Consult Scientific Services Frankfurt, Germany -- View this message in context: http://old.nabble.com/Date-display-bug-tp27543842p27543842.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (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 |
|
Does anyone know why, when I try to open Page Setup to change printing options for ouput that it fails to open. There is absolutely no page setup window that appears at all. While I am using SPSS 17, the data file came from SPSS 15?
Thanks
ZD |
| Free forum by Nabble | Edit this page |
