If the date format of
a SAS column does not match the date format of the corresponding data
column, convert the SAS date values to appropriate values. The SAS
DATEFMT= option enables you to convert date values from a SAS date
format to different SAS date format.
Use SAS DATEFMT= to
prevent date type mismatches under these circumstances:
-
during input operations to convert
data source 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 data source date
values
If the SAS date format
and the data source date format match, this option is not needed.
The default SAS date
format is data source-specific and is determined by the data type
of the data source column. See the documentation for your
SAS/ACCESS
interface.
Note: For non-English date types,
SAS automatically converts the data to the SAS type of NUMBER. The
SAS DATEFMT= option does not currently handle these date types. You
can use a PROC SQL view to convert the source data to a SAS date format,
as you retrieve the data. You can also use a format statement in other
contexts.