In the code below, I create the dtfmt picture format. You can see the full list of directives in the PROC FORMAT Picture Statement Documentation. %C: Full month name (January, February, …) %a: The abbreviated weekday name (Mon, Tue, …) %A: The full weekday name (Monday, Tuesday, …) There are quite a lot of directives to choose from. Next, we use the concept of directives to tell SAS how to present the date. You can use the Datatype=Date Option in the Picture Statement to specify that the format is to be applied to a date value. This post will demonstrate a few examples. Luckily, you can write your own date format with Proc Format. However, once in a while, you need a date or datetime format, but you can not find an existing format that fits your needs. You can browse them directly in the Format Documentation. SAS provides tons of out-of-the-box formats for you to use. As you probably know, SAS dates are formated integers.
0 Comments
Leave a Reply. |