Writes SAS date values in the form mmdd[yy]yy or mmXddX[yy]yy, where X represents a specified separator and the year appears as either 2 or 4 digits.
Category: | Date and Time |
Alignment: | Right |
identifies a separator or specifies that no separator appear between the month, the day, and the year. 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 month and the day as possible. When w is 7, the date appears as a two-digit year without separators. |
When x has a value of N, the width range changes to 2–8. |
Statements
|
Results
|
---|---|
|
----+----1----+ |
select put(19431,mmddyyc5.); |
03:14 |
select put(19431,mmddyyd8.) |
03-14-13 |
select put(19431,mmddyyn8.); |
03132013 |
select put(19431,mmddyyp10.) |
03.14.2013 |