"ww" = week of year as two-digit number (1, 2.“q” = quarter of year as one-digit number (1, 2, 3, 4)."yy" = two-digit year (century is omitted)."mmm" = month as three-character abbreviation (JAN, FEB."mm" = month as two-digit number (01, 02."ddd" = day of year as three-digit number (1, 2.“dd” = day of month as two-digit number (01, 02.In the "Date-Time Unit" column, the date components are represented using the following codes: SPSS date formats as applied to an example date/time of Thursday, January 31, 2013, 1:02:33.72 (AM). The actual date formats that you will use in your SPSS syntax are as follows. month-day-year versus year-month-day), and the presence or absence of delimiters. Your choice of format will depend on the whether or not the input is a date or a duration, as well as the time units included in the data value, the order of the units (e.g. Changing the display format for an existing date variable (without changing the underlying data).Converting a variable from string or numeric to date.Initializing a new date or duration variable.There are different formats for different variable types, and each format in SPSS has a unique name.ĭate-time formats are used in several situations:
A format is a named, pre-defined pattern that tells SPSS how to interpret and/or display different types of variables. When reading data containing dates or using certain date-time functions, we need to tell SPSS which date format to use, so that it knows how to correctly parse the components of the input string.