Hello
In SAS, Dates are stored as numeric values. Numeric values (by default) use 8 bytes in storage.
The date values are not stored as is, but are converted in to a number by calculating the number of days that have passed from 1st Jan 1960, to the given date. This number is then stored in numeric form taking up 8 bytes by default.
Formats simply tell SAS how a value should be displayed. You can change the format without affecting whatever value was actually stored. For example, if you changed the format to MMDDYY5., then the dates would only display MM/YY part of the date. But that would not affect the actual value stored, so, if you went back to using the format MMDDYY10., then you would see the date how it is seen now.
In SAS, Dates are stored as numeric values. Numeric values (by default) use 8 bytes in storage.
The date values are not stored as is, but are converted in to a number by calculating the number of days that have passed from 1st Jan 1960, to the given date. This number is then stored in numeric form taking up 8 bytes by default.
Formats simply tell SAS how a value should be displayed. You can change the format without affecting whatever value was actually stored. For example, if you changed the format to MMDDYY5., then the dates would only display MM/YY part of the date. But that would not affect the actual value stored, so, if you went back to using the format MMDDYY10., then you would see the date how it is seen now.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.