Data work.my_data_file; Result_1 = MDY(11,27,83); Result_2 = MDY(11,27,1983); Result_3 = MDY(09,01,84); Result_4 = put(Result_1, worddate.); Result_5 = put(Result_1, date9.); Result_6 = put(Result_1, date11.); Run; |
What's happening in the script above?
Variable | Input | Output | Description |
---|---|---|---|
Result_1 | mdy(11,27,83) | 8731 | MDY output; 2 Digit Year |
Result_2 | mdy(11,27,83) | 8731 | MDY output; 4 Digit Year |
Result_3 | mdy(09,01,84) | 9010 | MDY output; 2 Digit Year |
Result_4 | mdy(11,27,1983) | November 27, 1983 | Format; worddate. |
Result_5 | mdy(11,27,1983) | 27NOV1983 | Format; date9. |
Result_6 | mdy(11,27,1983) | 27-NOV-1983 | Format; date11. |
See also; Put Function
Kevin Regan
Have an article, idea, found a typo, want to contribute? Shoot me an email
Here
Below are links to some Udemy Data Science Courses. I've been using Udemy for a number of years now, and I've found their courses super helpful, maybe you will also.