Writes date values in the form [yy]yymmdd or [yy]yy-mm-dd. The x in the format name is a character that represents the special character which separates the year, month, and day. This special character can be a hyphen (-), period (.), blank character, slash (/), colon (:), or no separator. The year can be either 2 or 4 digits.
| Category: | Date and Time |
| Alignment: | Right |
identifies a separator or specifies that no separator appear between the year, the month, and the day. Valid values for x are any of the following:
separates with a blank
separates with a colon
separates with a hyphen
indicates no separator
separates with a period
separates with a slash.
specifies the width of the output field.
| Default | 8 |
| Range | 2–10 |
| Interactions | When w has a value of from 2 to 5, the date appears with as much of the year and the month. When w is 7, the date appears as a two-digit year without separators. |
| When x has a value of N, the width range is 2–8. |
| yymmdd |
| [yy]yyxmmxdd |
|
Statements
|
Results
|
|---|---|
|
|
----+----1----+ |
select put(19704,yymmddc5.); |
13:12 |
select put(19704,yymmddd8.); |
13-12-12 |
select put(19704,yymmddn8.); |
20131212 |
select put(19704,yymmddp10.); |
2013.12.12 |