If the date format of
a SAS column does not match the date format of the corresponding DBMS
column, you must convert the SAS date values to the appropriate DBMS
date values. The SASDATEFMT= option enables you to convert date values
from the default SAS date format to another SAS date format that you
specify.
Use the SASDATEFMT=
option to prevent date type mismatches in the following circumstances:
-
during input operations to convert
DBMS date values to the correct SAS DATE, TIME, or DATETIME values
-
during output operations to convert
SAS DATE, TIME, or DATETIME values to the correct DBMS date values.
The column names specified
in this option must be DATE, DATETIME, or TIME columns; columns of
any other type are ignored.
The format specified
must be a valid date format; output with any other format is unpredictable.
If the SAS date format
and the DBMS date format match, this option is not needed.
The default SAS date
format is DBMS-specific and is determined by the data type of the
DBMS column. See the documentation for your data source.
Note: For non-English date types,
SAS automatically converts the data to the SAS type of NUMBER. The
SASDATEFMT= option does not currently handle these date types; however,
you can use a PROC SQL view to convert the DBMS data to a SAS date
format as you retrieve the data, or use a format statement in other
contexts.
Oracle
details: It is recommended that the DBSASTYPE=
data set option be used instead of SASDATEFMT=.