SAS dates are stored internally as the number of days since 01JAN1960, so for example 21915 is 01JAN2020. The FORMAT statement allows 21915 to be shown to humans as 01JAN2020, which humans can understand. Humans cannot understand 21915 as a date, although SAS does understand it as a date.
Try the code without the FORMAT statement to see what happens.
A format in SAS is used to display values in a certain manner; in your particular case, the format displays the internal value of a SAS date (the count of days starting at 1960-01-01) in a human-readable manner.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9. Sign up by Dec. 31 to get the 2024 rate of just $495. Register now!