ISO 8601 is a widely
used data standard for dates, times, durations, and intervals. The
values are stored as text strings. They are formatted in a way that
ensures that all of the components are always unambiguous. ISO 8601
is both platform and software independent, which makes it suitable
for data interchange.
Many data standards
use a simplified subset of ISO 8601 for specifying their own dates,
times, and durations. This is true of several CDISC standards, including
SDTM.
A complete discussion
of ISO 8601 and the CDISC subset of ISO 8601 is beyond the scope of
this document. The following tables provide a general idea of what
the text strings look like and how to interpret their values. Additional
information is in the references.
This list provides a
summary of the SAS Clinical Standards Toolkit support of ISO 8601:
-
Consistent with CDISC SDTM guidelines,
the SAS Clinical Standards Toolkit does not support the ISO 8601 basic
format. This means that the text strings must contain the hyphen delimiter
for parts of the dates, and the colon delimiter for parts of the time.
-
The SAS Clinical Standards Toolkit
does not support some of the rarely used formats allowed by ISO 8601.
The week (W) formats for dates, Julian dates, and extended dates (used
to denote years greater than 9999) are not supported.
SAS provides capabilities
for processing ISO 8601 text strings that are far beyond those capabilities
required by the SAS Clinical Standards Toolkit and CDISC standards.
-
The SAS informats $N8601B. and
$N8601E. convert an ISO 8601 text string to a special string called
an ISO 8601 entity.
The ISO 8601 entity
is a complex binary value that is stored as a hexadecimal value in
a SAS string variable.
The ISO 8601 entity
string is useful for reporting in the ISO 8601 format because it prevents
the loss of valuable information from the input ISO 8601 text string.
-
The ISO 8601 entity value should
not be confused with the traditional numeric SAS date, time, or datetime
value.
-
The ISO 8601 entity should not
be used in calculations or comparisons.
-
The CALL IS8601_CONVERT routine
can be used to generate traditional numeric SAS dates, times, and
datetime values from an ISO 8601 string.
-
For additional information, see
the online SAS documentation.