Input/Display
formats for variable data files
Following
are guidelines for the differences between how data is displayed and how
it is stored internally depending on the format:
- For data formats of Numeric,
no thousands separator, Numeric,
using comma as thousands separator and Numeric,
using dot as thousands separator type, values
can be entered with any number of decimal positions up to a maximum
of 16 and the entire value is stored internally. The data view of
this value displays only the defined number of decimal places and
rounds values with more decimals. The entire value, up to a width
of 12 characters (including the decimal as a character), is used in
computations.
- For variables
of String type, internally values are padded to the left
for the maximum width. For example, a String variable with a width of 5 and a value of Week, is stored internally as ' Week'. For display purposes, the values appear in
the data grid as they were entered. For example, 'Week
' or ' Week'.
- For variables of Date
or time format type, slashes, dashes, spaces, commas and periods
can be used as delimiters between day, month and year values. Three-letter
abbreviations (for example, Jan,
Feb, etc.) or complete names
(for example, January, February, etc.) can be used as
values for month. Dates of the format mm/dd/yy
will display with slashes as the delimiters and numbers for the values
of month, day and year (for example, 01/15/2012).
Dates of the format dd.mmm.yy
will display with a period as the delimiter with numbers for the values
of day and year and a three-letter abbreviation for the month (for
example, 10.Jan.2014). Dates
are stored internally as the number of seconds from a particular starting
date.
- For variables of Date
or time format type, colons,
periods or spaces can be used as delimiters between hours, minutes
and seconds. Time values are displayed with colons as delimiters.
Times are stored internally as a number of seconds that represents
a time interval. (For example, 9:00:00 is stored as 32400 (60 seconds
per minute x 60 minutes per hour x 9 hours)).
Related topics:
Variable Names for variable
data files
Variable Labels for
variable data files
Edit Code Values and
Value Labels
Changing data types
for variable data files
Set Variable Format
Variable View Width
for variable data files
Editing variable data