27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

58 Universals<br />

On some operating systems, such as IBM CMS, WK must be upper case. The displayed<br />

output is 43 WK 90 or 43 WK 1990, depending on whether the specified width allows<br />

enough space for all four digits of the year.<br />

• In time specifications, colons can be used as delimiters between hours, minutes, and<br />

seconds. Hours and minutes are required but seconds are optional. A period is required to<br />

separate seconds from fractional seconds. Hours can be of unlimited magnitude, but the<br />

maximum value for minutes is 59 and for seconds 59.999. . . .<br />

• Data values can contain a sign (+ or −) in TIME and DTIME formats to represent time<br />

intervals before or after a point in time.<br />

Example<br />

DATA LIST FIXED<br />

/VAR1 1-17 (DATE) VAR2 21-37 (ADATE) VAR3 41-47 (JDATE).<br />

BEGIN DATA<br />

28-10-90 10/28/90 90301<br />

28.OCT.1990 X 28 1990 1990301<br />

28 October, 2001 Oct. 28, 2001 2001301<br />

END DATA.<br />

LIST.<br />

• Internally, all date format variables are stored as the number of seconds from 0 hours, 0<br />

minutes, and 0 seconds of Oct. 14, 1582.<br />

The LIST output from these commands is shown in Figure 15.<br />

Figure 15 Output illustrating DATE, ADATE, and JDATE formats<br />

Example<br />

VAR1 VAR2 VAR3<br />

28-OCT-1990 10/28/1990 1990301<br />

28-OCT-1990 10/28/1990 1990301<br />

28-OCT-2001 10/28/2001 2001301<br />

DATA LIST FIXED /VAR1 1-10 (QYR) VAR2 12-25 (MOYR) VAR3 28-37 (WKYR).<br />

BEGIN DATA<br />

4Q90 10/90 43WK90<br />

4 Q 90 Oct-1990 43 WK 1990<br />

4 Q 2001 October, 2001 43 WK 2001<br />

END DATA.<br />

LIST.<br />

• Internally, the value of a QYR variable is stored as midnight of the first day of the first<br />

month of the specified quarter, the value of a MOYR variable is stored as midnight of the<br />

first day of the specified month, and the value of a WKYR format variable is stored as midnight<br />

of the first day of the specified week. Thus, 4Q90 and 10/90 are both equivalent to<br />

October 1, 1990, and 43WK90 is equivalent to October 22, 1990.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!