Formats |
Category: | Date and Time |
ISO 8601 | |
Alignment: | left |
Time Zone Format: | Yes |
ISO 8601 Element: | 5.4.1 Complete representation |
Syntax | |
Syntax Description | |
Details | |
Examples | |
See Also |
Syntax |
B8601DZw. |
specifies the width of the output field.
Default: | 26 |
Range: | 20 - 35 |
Details |
UTC values specify a time and a time zone based on the zero meridian in Greenwich, England. The B8602DZ format writes SAS datetime values for the zero meridian date and time using one of the following ISO 8601 basic datetime notations:
is the form used whenw is large enough to support this time zone notation.
is the form used when w is not large enough to support the +|-hhmm time zone notation.
yyyy |
is a four-digit year, such as 2008 | ||
mm |
is a two-digit month (zero padded) between 01 and 12 | ||
dd |
is a two-digit day of the month (zero padded) between 01 and 31 | ||
hh |
is a two-digit hour (zero padded), between 00 - 23 | ||
mm |
is a two-digit minute (zero padded), between 00 - 59 | ||
ss |
is a two-digit second (zero padded), between 00 - 59 | ||
Z |
indicates that the time is for zero meridian (Greenwich, England) or UTC time | ||
+|-hhmm |
is an hour and minute signed offset from zero meridian time. Note that the offset must be +|-hhmm (that is, + or - and four characters). Use + for time zones east of the zero meridian and use - for time zones west of the zero meridian. For example, +0200 indicates a two-hour time difference to the east of the zero meridian, and -0600 indicates a six-hour time differences to the west of the zero meridian.
|
Examples |
SAS Statement | Value of bdz | Results |
---|---|---|
put bdz b8601dz20.; |
1537113180 |
20080915T155300Z |
put bdz b8601dz26.; |
1537113180 |
20080915T155300+0000 |
See Also |
Working with Dates and Times Using the ISO 8601 Basic and Extended Notations |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.