If a SAS
variable is specified with a date, time, or datetime format in the
FORMAT statement, the interface view engine converts that value into
the equivalent Lotus datetime value. The conversion is written to
the DIF file when it is created. The DIF file has no way of relating
this formatting information to Lotus products. Therefore, when you
load the DIF file into a Lotus 1-2-3 worksheet, the datetime values
are represented as numbers. It is recommended that you assign (from
within Lotus) a Lotus datetime format to any datetime column that
you load from a DIF file.
If a SAS variable represents
a date, time, or datetime value, but it has not been assigned a SAS
datetime format, the SAS datetime value is represented as a number.
The number is not converted into an equivalent Lotus datetime value
in the DIF file. Rather, the number is written to the new DIF file
as is.
Note: SAS dates are based on January
1, 1960. Lotus dates are based on January 1, 1900. If you assign a
Lotus datetime format to an unconverted Lotus column, the datetime
values in that column are inaccurate.
Use the DBLOAD FORMAT
statement to maintain a SAS variable format in the input data set.
This changes the format only while the DBLOAD procedure is in progress.
Assigning a temporary format to a SAS variable does not affect how
SAS stores the variable.
If the SAS format for
the BirthDat variable in the MyData.SasEmps data set is the default
15.2 format, you can specify a FORMAT statement to change the format
to DATE7. Use the FORMAT statement while you are creating and loading
the DIF file. When you load the DIF file into a Lotus 1-2-3 worksheet,
specify an equivalent Lotus date format. Specify the FORMAT statement
when you invoke the DBLOAD procedure using any of the methods of processing.
When the DBLOAD procedure has completed, the SAS format for the BirthDat
variable reverts to its original 15.2 format.
Note: There are certain display
restrictions on the SAS datetime values that are loaded into Lotus
1-2-3 worksheets through DIF files. If you load a SAS variable with
a DATETIME
w.
d format
into a DIF file, Lotus stores the number with both the integer and
decimal. When you load the DIF file into a Lotus 1-2-3 worksheet that
you can specify a date format for the column. DATE formats only use
the integer portion of the data. Alternatively, you can also specify
a TIME format that only uses the decimal portion of the data. You
cannot specify both at the same time.