![]() compute days_passed = datediff(start_date,entry_date,'days'). Compute days before start of data analysis. ![]() Add start_date as January 20th., 2015 as new variable to data. I'll just create a new date variable (or -rather- constant) holding this date and subtract it from entry_date. So say I want to know how many days before 20 January 2015 patients entered the hospital. SPSS DATE.DMY creates a date from its components XDATE.JDAY for the day of the year (1 through 366).XDATE.WKDAY for the day of the week (1 through 7 where 1 is Sunday, not Monday).XDATE.MDAY for the day of the month (1 through 31).We built an SPSS-Python tool for it but it somehow stopped working around SPSS version 24.Īnother thing to keep in mind is that there's no such thing as XDATE.DAY. XDATE.WEEK returns nonsensical week numbersĪs discussed in SPSS Computes Wrong Week Numbers? Unfortunately, there's no easy way to extract the ISO week numbers that you probably want. value labels month 1 'January' 2 'February' 3 'March' 4 'April' 5 'May' 6 'June' 7 'July' 8 'August' 9 'September' 10 'October' 11 'November' 12 'December'.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |