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.

Precautions with Date and Time Variables<br />

Date and Time 69<br />

Dates and times are represented internally as seconds. The numbers for dates are very large,<br />

and arithmetic overflows can result. For example, dates in the 20th century are on the order<br />

of 10 to the 10th power (11 digits). For that reason, a few precautions are in order:<br />

• Some machine environments cannot accommodate the computation of higher powers of<br />

date and time variables. For example, computations higher than the sixth power may<br />

cause overflows on some machines.<br />

• The magnitude of the values may cause inaccuracies in some statistical procedures. It is<br />

advisable to subtract a fixed date if you want to keep seconds as the unit, or to convert<br />

days using the XDATE.TDAYS function. REGRESSION, CORRELATIONS, ANOVA, and<br />

ONEWAY use an adaptive centering method, so their accuracy will not be affected.<br />

• LIST, REPORT, and TABLES are the only procedures that display values in date and time formats.<br />

The PRINT and WRITE transformation commands can also display and write date and<br />

time formats. However, some summary variables in REPORT and calculated variables in<br />

TABLES display in F format, regardless of the print formats of variables used as arguments.<br />

• All other procedures use F format in all cases. The default width and number of decimal<br />

places is taken from the print format, but the format type is ignored. For example, in a<br />

frequency table, the date 1/09/57 with a print format of DATE9 will be displayed as<br />

11830147200, not 01-SEP-57.<br />

• Changing the print format in no way alters the values that are stored. For example, if you<br />

assign a print format of DATE9 for a variable read with DATETIME format, the time of day<br />

will not display but continues to be part of the value. This means that seemingly identical<br />

values can be displayed as separate entries within procedures.

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

Saved successfully!

Ooh no, something went wrong!