Working with Dates and Times By Using the ISO 8601 Basic and Extended Notations

ISO 8601 Formatting Symbols

The following list explains the formatting symbols that are used to notate the ISO 8601 dates, time, datetime, durations, and interval values:

n

specifies a number that represents the number of years, months, or days

P

indicates that the duration that follows is specified by the number of years, months, days, hours, minutes, and seconds

T

indicates that a time value follows. Any value with a time must begin with T.

Requirement Time values that are read by the extended notation informats that begin with the characters E8601 must use an uppercase T.

W

indicates that the duration is specified in weeks.

Z

indicates that the time value is the time in Greenwich, England, or UTC time.

+|-

the + indicates the time zone offset to the east of Greenwich, England. The - indicates the time zone offset to the west of Greenwich, England.

yyyy

specifies a four-digit year

mm

as part of a date, specifies a two-digit month, 01–12

dd

specifies a two-digit day, 01–1

hh

specifies a two-digit hour, 00–24

mm

as part of a time, specifies a two-digit minute, 00–59

ss

specifies a two-digit second, 00–59

fff | ffffff

specifies an optional fraction of a second using the digits 0–9:

fff use 1 - 3 digits for values read by the $N8601B informat and the $N8601E informat
ffffff use 1 - 6 digits for informat other than the $N8601B informat and the $N8601E informat

Y

indicates that a year value precedes this character in a duration

M

as part of a date, indicates that a month value precedes this character in a duration

D

indicates that a day value precedes this character in a duration

H

indicates that an hour value precedes this character in a duration

M

as part of a time, indicates that a minute value precedes this character in a duration

S

indicates that a seconds value precedes this character in a duration

Definitions

Local time
The local time when a time zone is not specified by the TIMEZONE= system option.
Time zone offset
Specifies the number of hours and minutes that a time zone is from Universal Coordinate Time (UTC) in the form +|–hh:mm or +|–hhmm.
User local time
The local time for the time zone that is specified by the TIMEZONE= system option. For more information, see TIMEZONE= System Option in SAS System Options: Reference.
UTC
Universal Coordinate Time is the time at the zero meridian, near Greenwich, England. UTC is a datetime value that uses the ISO 8601 basic form yyyymmddThhmmss+|–hhmm or the ISO 8601 extended form yyyy-mm-ddThh:mm:ss+|–hh:mm.

About Dates and Times That Use the ISO 8601 Basic and Extended Notations

ISO 8601 is an international standard for representing dates and time, including many variations for representing dates, times, and intervals. The two main representations of date, time, and datetime values within the ISO 8601 standards are the basic and extended notations. A value is considered extended when delimiters separate the various components within the value, whereas a basic value omits the delimiters. The extended format requires hyphen delimiters for date components (year, month, and day) and colon delimiters for time components (hour, minute, and second). Spaces are not allowed in any ISO 8601 representation. The structures for each data type require that you fill each placeholder with a value, including adding a zero to single-digit months, days, hours, and minutes. When you specify a datetime value, an uppercase T is the required delimiter between the date and time.
Some of the ISO 8601 formats are for formatting time and datetime values in UTC. The time or datetime value includes a time zone offset, which is a positive or negative number that represents the number of hours a time zone is from the zero meridian. Positive numbers are east of the zero meridian, and negative numbers are west of the zero meridian. The time zone offset at the zero meridian is always zero.
Here are examples of basic and extended notations for ISO 8601 date, time, datetime, and duration values:
  • 2013-02-01 is a date that is formatted using the extended notation.
  • 125234-0500 is a time with a time zone offset five hours west of the zero meridian and is formatted using the basic notation.
  • 2013-02-01T12:52:34+09:00 is a datetime value with a time zone offset nine hours east of the zero meridian and is formatted using the extended notation.
  • P20130501T120000 is a duration value that is formatted using the basic notation.
When SAS reads an ISO 8601 value that specifies UTC with a time offset, the time or datetime value is adjusted to account for the offset from the zero meridian.
The SAS ISO 8601 formats for UTC with a time zone offset are based on the following time, datetime, and time zone offsets:
  • the zero meridian time or datetime near Greenwich, England (The offset is always +|–0000 or +|–00:00.)
  • the local time or datetime, which uses the zero meridian time with a time zone offset for the local time
  • a zero meridian datetime that uses a time zone offset for the user local time
  • a user local time or datetime, which uses the current time for a time zone with a time zone offset for the user local time

Basic ISO 8601 Date, Time, and Datetime Values

Basic formats and informats are prefixed with B8601 and take these forms:
Date yyyymmdd
Time hhmmss<ffffff>
Datetime yyyymmddThhmmss<ffffff>
Time with time zone hhmmss<ffffff>+|–hhmm
Datetime with time zone yyyymmddThhmmss<ffffff>+|–hhmm
SAS uses the formats in the following table to write date, time, and datetime values in the ISO 8601 basic notations from SAS date, time, and datetime values.
Date, Time, or Datetime
ISO 6801 Notation
Example
Format
Date
yyyymmdd
20120915
Writes the date from a datetime.
yyyymmdd
20120915
Time
hhmmssffffff
155300322348
Zero meridian time and time zone offset.
The time zone offset is always +0000 or Z.
hhmmss+|–hhmm
155300+0000
hhmmssZ
155300Z
Zero meridian time that uses a time zone offset for the local time.
hhmmss+|–hhmm
155300–0500
Converts time to a user local time by using a time zone offset for the user local time.
hhmmss+|–hhmm
155300–0500
Datetime
yyyymmddThhmmssffffff
20120915T155300
Zero meridian datetime and time zone offset.
The time zone offset is always +0000 or Z.
yyyymmddThhmmss+|–hhmm
20120915T155300–0000
yyyymmddThhmmssZ
20120915T155300Z
Zero meridian datetime that uses a time zone offset for the user local time.
yyyymmddThhmmss+|–hhmm
20120915T155300+0500
Converts a datetime value to the user local time by using a time zone offset for the user local time.
yyyymmddThhmmss+|–hhmm
20120915T155300+0500
An asterisk ( * ) is used in place of a date- or time-formatted value that is out-of-range. Increase the width.

Extended ISO 8601 Date, Time, and Datetime Values

Extended formats and informats are prefixed with E8601 and take these forms:
Date yyyy-mm-dd
Time hh:mm:ss<ffffff>
Datetime yyyy-mm-ddThh:mm:ss<ffffff>
Time with time zone hh:mm:ss<ffffff>+|–hh:mm or hh:mm:ss<ffffff>Z
Datetime with time zone yyyy-mm-ddThh:mm:ss<ffffff>+|–hh:mm or yyyy-mm-ddThh:mm:ss<ffffff>Z
SAS uses the formats in the following table to write date, time, and datetime values in the ISO 8601 extended notations from SAS date, time, and datetime values.
Date, Time, or Datetime
ISO 8601 Notation
Example
Format
Date
yyyy-mm-dd
2012-09-15
Writes the date from a datetime.
yyyy-mm-dd
2012-09-15
Time
hh:mm:ss.ffffff
15:53:00.322348
Zero meridian time and time zone offset.
The time zone offset is always +00:00.
hh:mm:ss.ffffff+|–hh:mm
15:53:00+00:00
Zero meridian time that uses a local time zone offset.
hh:mm:ss.ffffff+|–hh:mm
15:53:00+05:00
Converts time to user local time by using a local time zone offset.
hh:mm:ss+|–hh:mm
15:53:00+05:00
Datetime
yyyy-mm-ddThh:mm:ss.ffffff
2012-09-15T15:53:00
Zero meridian datetime and time zone offset.
The time zone offset is always +00:00.
yyyy-mm-ddThh:mm:ss.nnnnnn+|–hh:mm
2013-09-15T15:53:00+00:00
Zero meridian datetime that uses a time zone offset for the user local time.
yyyy-mm-ddThh:mm:ss+|–hh:mm
2013-09-15T15:53:00–05:00
Converts a datetime value to the user local time by using a time zone offset for the user local time.
yyyy-mm-ddThh:mm:ss+|–hh:mm
2013-09-15T185300–0500
An asterisk ( * ) is used in place of a date- or time-formatted value that is out-of-range. Increase the format width.
For more information about time zones, see Specifying Time Zones in SAS in SAS National Language Support (NLS): Reference Guide and TIMEZONE= System Option in SAS System Options: Reference.

Tips for Remembering UTC Formats That Use Time Zone Offsets

Here are tips to help you remember which format to use for UTC:
  • A T in the last two letters is a time value.
  • A D in the last two letters is a datetime value.
  • A Z in the last two letters is a zero meridian time and a zero meridian offset, except for LZ.
  • An L in the last two letters is a zero meridian time with a local or user local time zone offset.
  • An X in the last two letters is for user local time or datetime and uses a user local time zone offset that is determined by the TIMEZONE= system option.
Here is information to help you determine the format for UTC:
TZ or DZ
LZ
LX
TX or DX
Zero meridian date or datetime that uses a zero meridian time zone offset
Zero meridian time that uses a local time zone offset
Zero meridian datetime that uses a user local time zone offset
User local time or datetime that uses a user local time zone offset

Examples of Reading and Writing Basic and Extended ISO 8601 Date, Time, and Datetime Values

About the Basic and Extended ISO 8601 Examples

The examples in this section demonstrate how to use various informats to read date, time, and datetime values into SAS date, time, and datetime variables. The examples also illustrate how to use formats to write these values in a way that is meaningful to users.

Comparing ISO 8601 Extended Format Output

This example compares the output for the different extended notations for time and datetime values.
data _null_;
d='15Sep2013:5:53:00'dt;
tm='05:53:00't;
put 'd=' d datetime.;
put 'e8601dz=' d e8601dz.;
put 'e8601lx=' d e8601lx.;
put 'e8601dx=' d e8601dx.;
put 'tm=' tm time.;
put 'e8601tz=' tm e8601tz.;
put 'e8601lz=' tm e8601lz.;
put 'e8601tx=' tm e8601tx.;
run;
The program executed using the local time for the eastern United States and no value for the TIMEZONE= system option. Therefore, the time zone formats E8601LZ., E8601DX., and E8601TX. show local times.
  • The output for the E8601DZ. and E8601TZ. formats write a SAS datetime and time value as the time at the zero meridian by using a time zone offset of +0000 or +00:00.
  • The output for the E8601LX. and E8601LZ. formats write a SAS datetime value as the time at the zero meridian by using a time zone offset for the local time.
  • The output for the E8601DX. and E8601TX. formats converts the time to Eastern Time by using a time zone offset for the local time.
d=15SEP13:05:53:00
e8601dz= 2013-09-15T05:53:00+00:00
e8601lx= 2013-09-15T05:53:00-05:00
e8601dx= 2013-09-15T00:53:00-05:00
tm= 5:53:00
e8601tz=05:53:00+00:00
e8601lz=05:53:00-05:00
e8601tx=00:53:00-05:00
Here are the results when the TIMEZONE= option is set to America/Los_Angeles:
d=15SEP13:05:53:00
e8601dz= 2013-09-15T05:53:00+00:00
e8601lx= 2013-09-15T05:53:00-07:00
e8601dx= 2013-09-14T22:53:00-07:00
tm= 5:53:00
e8601tz=05:53:00+00:00
e8601lz=05:53:00-05:00
e8601tx=21:53:00-08:00
  • The E8601DZ. and E8601TZ. formats do not change. They always show the time as the time at the zero meridian.
  • The E8601LX. format shows the zero meridian time by using the time zone offset for the America/Los_Angeles time zone.
  • The E8601DX. formats show the local date and time in Los Angeles by using the time zone offset for the America/Los_Angeles time zone. The Los Angeles time zone offset of –07:00 indicates that the local time is seven hours earlier than the time at the zero meridian. This changes the date to the 14th.
  • The E8601LZ. format shows the time at the zero meridian by using the time zone offset for the eastern United States because that is where the code executed.
  • The E8601TX. format shows the time seven hours earlier from the zero meridian by using a time zone offset for the America/Los_Angeles time zone.

Reading and Writing Date Values

Suppose that you have a clinical trial where an event begins on April 2, 2012, and ends on April 8, 2012. The dates are recorded without time values, as follows: 20120402 and 2012-04-08. You can read these values into SAS with the B8601DAw. and E8601DAw. informats. You can write dates in the same form by using the B8601DAw. and E8601DAw. formats. These formats output the newly created SAS dates in an easy-to-read layout rather than the numeric value of days since 1/1/1960.
data a;
input var1 b8601da8. +1 var2 e8601da10.;
put var1=b8601da. var2=e8601da.;
datalines;
20120402 2012-04-08
;
run;
Here is the output from the SAS log:
var1=20120402 var2=2012-04-08
By using the B8601DNw. and E8601DNw. formats, you can extrapolate the date from a datetime value. This example reads the datetime value by using the B8601DNw. informat, and writes the date by using the B8601DNw. format:
data _null_;
input @1 dt b8601dn.;
put dt b8601dn.;
datalines;
20130915T094322
run;
Here is the output from the SAS log:
  20130915

Reading and Writing Time Values with No Time Zone Offsets

You can read time values that do not have time zone offset values into SAS time values by using the B8601TMw.d and E8601TMw.d informats. The B8601TMw.d and the E8601TMw.d formats write time values that do not have time zone offset values, as shown in this example:
data _null_;
x=input('12:34:56',e8601tm8.);
put x=b8601tm8. x=e8601tm10.;
run;
Here is the output from the SAS log:
x=123456 x=12:34:56

Reading and Writing Time Values with Time Zone Offsets

This example uses the E8601TZw.d informat to read a time value that contains a time zone offset. The B8601TZw.d and E8601TZw.d formats write the time values by using a time zone offset for the zero meridian:
data _null_;
x=input('12:34:56-04:00',e8601tz14.);
put x=e8601tz14.;
put x=b8601tz.;
run;
Here is the output from the SAS log:
x=16:34:56+00:00
x=163456+0000
You can adjust a time to be the time in another time zone by using a time zone offset. You specify the time zone by using the TIMEZONE= system option, and then format the time by using the B8601TXw. or E8601TXw. formats. This example writes the time for a user by using the time zone name PST (Pacific Time):
options timezone=pst;
data _null_;
x='12:34:56't;
put x=e8601tx.;
run;
Here is the output from the SAS log:
04:34:56-08:00

Reading and Writing Time Values with Local Time Zone Offsets

Because time values are scalar, SAS does not typically compute time values based on the time zone of the programmer’s location. One exception to this rule occurs when a SAS time (not a datetime) is computed and then formatted with either the B8601LZw. format or the E8601LZw. format. These two formats query the host code to determine the time zone offset. Then, the current local time and the time zone offset (based on your time zone) are displayed accordingly:
data _null_;
x=time();
put x=e8601lz.;
run;
Here is the output from the SAS log:
x=13:49:02-04:00

Reading and Writing Datetime Values with No Time Zone Offset

In the following DATA step, SAS reads datetime values with the B8601DTw. and E8601DTw. informats and writes the datetime values by using the B8601DTw. and E8601DTw. formats:
data _null_;
input dtB :b8601dt15. dtE :e8601dt19.;
put dtB=b8601dt. dtE=e8601dt.;
datalines;
20120402T124022 2012-04-02T12:30:22
;
run;
Here is the output from the SAS log:
dtB=20120402T124022 dtE=2012-04-02T12:30:22
This example reads and writes a Java datetime value and writes the value by using the B8601DTw.d format:
data a;
input dt1 b8601dj.;
put dt1=b8601dt.;
datalines;
20120402123245
;
run;
Here is the output from the SAS log:
dt1=20120402T123245

Reading and Writing Datetime Values with Time Zone Offsets

The B8601DZw. and E8601DZw. formats always write a datetime value for the zero meridian. The offset is always +0000 or +00:00.
In this example, SAS reads a datetime value with an offset and writes the datetime value by using an offset for the zero meridian:
data _null_;
x=input('2012-08-01T12:34:56-04:00',e8601dz25.);
put x=e8601dz25.;
run;
Here is the output from the SAS log:
x=2012-08-01T16:34:56+00:00
You use the B8601DXw. and E8601DXw. formats to adjust a datetime with a time zone offset to be the time for a specific time zone. You set the time zone by using the TIMEZONE= system option. The input value is converted to the time for the time zone and formatted using a time zone offset. This example reads the datetime value with an offset (–04:00) by using the E8601DZw. informat and writes the datetime value for the time zone in Zurich (+02:00):
options timezone='europe/zurich';
data _null_;
x=input('2012-08-01T12:34:56-04:00',e8601dz25.);
put x=e8601dx25.;
run;
Here is the output from the SAS log:
x=2012-08-01T18:34:56+02:00
In this example, the TIMEZONE= system option sets the time zone ID to America/Anchorage. The datetime value is written for this time zone ID by using the E8601DXw. format. The time zone offset is the difference between the America/Anchorage time zone and UTC, which is 9 hours.
options timezone='america/anchorage';
data _null_;
t='01Feb2013T12:34:56'dt;
put t=e8601dx.;
run;
Here is the output from the SAS log:
 2013-02-01T03:34:56-09:00

Reading and Writing Time and Datetime Values with Time Zone Offsets for Local Times

Because time values are scalar, SAS does not typically compute time values based on the time zone of the programmer’s location. One exception to this rule occurs when a SAS time (not a datetime) is computed and then formatted with either the B8601LZw. format or the E8601LZw. format. These two formats query the host code to determine the offset. Then, the current local time and the offset (based on your time zone) are displayed accordingly:
data _null_;
x=time();
put x=e8601lz.;
run;
Here is the output from the SAS log:
x=13:49:02-04:00
You can write a user’s local datetime value by using the time zone offset. Specify the user’s time zone by using the TIMEZONE= system option and the B8601LXw. or E8601LXw. formats. This example writes the datetime for a user by using the time zone name PST (Pacific Time):
options timezone=pst;
data _null_;
x='01Feb2013T12:34:56'dt;
put x=e8601lx.;
run;
Here is the output from the SAS log:
 2013-02-01T12:34:56-07:00

Writing ISO 8601 Duration, Datetime, and Interval Values

Duration, Datetime, and Interval Formats

A duration is the period of time that is the difference between two time points. Each time point begins with P and is followed by the date and time in either basic or extended notation. Durations can be negative or positive values and can be expressed in these forms:
  • PyyyymmddThhmmss
  • Pyyyy-mm-ddThh:mm:ss
  • Pyyyy-mm-dd is a span of years, months, and days
  • PnYnMnDTnHnMnS is the number of years (Y), months (M), days (D), hours (H), minutes (M), and seconds (S)
  • PnW specifies the number of weeks
The y, m, and d placeholders must have a value, even if the value is 0.
The n placeholder can be 0 or a positive number. The component that contains an n can be omitted. For example, P0Y0M3DT0H0M0S can be written as P3D.
When you use the PnW notation, W must be the only component in the duration.
An interval comprises two values that represent the beginning and end of an event, and it is a duration that is anchored to a specific point in time. Intervals are represented in the following forms:
  • datetime/datetime
  • datetime/duration
  • duration/datetime
SAS writes duration, datetime, and interval values from character data by using these formats:
Time Component
ISO 8601 Notation
Example
Format
Duration - Basic Notation
PyyyymmddThhmmssfff
P20120915T155300
$N8601BA
–PyyyymmddThhmmssfff
–P20120915T155300
$N8601BA
Duration - Extended Notation
Pyyyy-mm-ddThh:mm:ss.fff
P2012-09-15T15:53:00
$N8601EA
–Pyyyy-mm-ddThh:mm:ss.fff
–P2012-09-15T15:53:00
$N8601EA
Duration - Basic and Extended Notation
PnYnMnDTnHnMnS
P2y10m14dT20h13m45s
$N8601B
$N8601E
–PnYnMnDTnHnMnS
–P2y10m14dT20h13m45s
$N8601B
$N8601E
PnW (weeks)
P6w
$N8601B
$N8601E
Interval - Basic Notation
yyyymmddThhmmssfff/yyyymmddThhmmssfff
20120915T155300/20141113T000000
$N8601BA
PnYnMnDTnHnMnS/yyyymmddThhmmssfff
P2y10M14dT20h13m45s/20120915T155300
$N8601B
yyyymmddThhmmssfff/PnYnMnDTnHnMnS
20120915T155300/P2y10M14dT20h13m45s
$N8601BA
Interval - Extended Notation
yyyy-mm-ddThh:mm:ss.fff/yyyy-mm-ddThh:mm:ss.fff
2012-09-15T15:53:00/2014-11-13T00:00:00
$N8601EA
PnYnMnDTnHnMnS/yyyy-mm-ddThh:mm:ss.fff
P2y10M14dT20h13m45s/2012-09-15T15:53:00
$N8601E
yyyy-mm-ddThh:mm:ss.fff/PnYnMnDTnHnMnS
2012-09-15T15:53:00/P2y10M14dT20h13m45s
$N8601EA
Datetime - Basic Notation
yyyymmddThhmmss.fff+|–hhmm
20120915T155300
$N8601BA
(all blank)
$N8601B
$N8601BA
$N8601E
$N8601EA
Datetime - Extended Notation
yyyy-mm-ddThh:mm:ss.fff+|–hhmm
2012-09-15T15:53:00
+04:30
$N8601EA
(all blank)
$N8601B
$N8601BA
$N8601E
$N8601EA

Writing Partial and Missing Components

When any component of a date or time is not provided, it is called a partial value, and the components are considered missing. You can represent a missing component in a value by using a hyphen ( - ) or an x. A single hyphen represents the entire value for a given component. For example, one single hyphen can replace a four-digit year. A single x represents one character for a given component. A missing two-digit month would be written as xx. If the time portion is omitted when a date value is specified, the T must also be omitted.
Missing components in the durations form PnYnMnDTnHnMnS are dropped; they do not contain a hyphen or an x. For example, in P2mT4H, the year, day, minutes, and seconds are missing and have been dropped.
Do not confuse missing components with zero values. The durations P3D and P0000-00-03 are not the same because a component value of 0 is not the same as a missing component value. Change instances of 0 to x (Pxxxx-xx-03) for this value to be considered the equivalent of P3D.
Missing components are not allowed for values that contain a time zone offset. Therefore, use 00 in place of omitted components.
The following formats write omitted components that use the hyphen and the x:
Format
Datetime Form
Duration Form
Example
$N8601H
yyyy-mm-ddThh:mm:ss
PnYnMnDTnHnMnS
--09-15T15:-:53
P2Y2DT4H5M6S/--09-15T15:-:00
$N8601EH
yyyy-mm-ddThh:mm:ss
Pyyyy-mm-ddThh:mm:ss
P000---02T02:55:20/2012---15T-:-:45
$N8601X
yyyy-mm-ddThh:mm:ss
PnYnMnDTnHnMnS
P2Y2DT4H5M6S/xxxx-09-15T15:xx:00
$N8601EX
yyyy-mm-ddThh:mm:ss
Pyyyy-mm-ddThh:mm:ss
P0003-xx-02T02:55:20/2012-xx-15Txx:xx:45
Datetime values with missing components that are formatted with either the $N8601B. format or the $N8601BA. format are formatted in the extended notation that uses the hyphen for missing components to ensure accurate data. For example, when the month is the missing component, the value 2012---15 is written, and not 2012-15.
The extended notation with hyphens is also used instead of the basic notation if a duration is formatted using the $N8601BA. format. Using the same date, P2012---15 is written, and not P2012-15.

Writing Truncated Duration, Datetime, and Interval Values

Duration, datetime, and interval values can be truncated when one or more lower-order values are 0 or are not significant. When SAS writes a truncated value that uses the formats $N8601B., $N8601BA., $N8601E., and $N8601EA., the display of the value stops at the last nonmissing component.
When you format a truncated value by using either the $N8601H. format or the $N8601EH. format, the lower-order components are written with a hyphen. When you format a truncated value that uses the $N8601X. format or the $N8601EX. format, the lower-order components are written with an x.
These examples show truncated values:
  • p00030202T1031
  • 2012-09-15T15/2014-09-15T15:53
  • –p0003-03-03T-:-:-
  • P2y3m4dT5h6m
  • 2012-09-xxTxx:xx:xx
  • 2012

Normalizing Duration Components

When a value for a duration component is greater than the largest standard value for a component, SAS normalizes the component except when the duration component is a single component. The following table shows examples of normalized duration components:
Duration
Extended Normalized Duration
p3y13m
p0004-01
pt24h24m65s
P----01T-:25:05
p3y13mT24h61m
P0004-01-01T01:01
p0004-13
p0005-01
p0003-02-61T15:61:61
P0003-04-01T16:02:01
p13m
P13M
If a component contains the largest value, such as 60 for minutes or seconds, SAS normalizes the value and replaces the value with a hyphen. For example, pT12:60:13 becomes PT13:-:13.
Thirty days is used to normalize a month.
Dates and times in a datetime value that are greater than the standard value for the component are not normalized. They produce an error.

Fractions in Durations, Datetime, and Interval Values

Ending components can contain a fraction that consists of a period or a comma, followed by one to three digits. The following examples show the use of fractions in duration, datetime, and interval values:
  • 201209.5
  • P2012-09-15T10.33
  • 2012-09-15/P0003-03-03,333