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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.