SAS numeric formats are used to control how numeric data is displayed in SAS output. Here are some commonly used SAS numeric formats:
BEST.: The default format for numeric values in SAS. It displays the data in the most appropriate width based on the value.
COMMA10.: Displays the data with commas separating the thousands. For example, 12345678 would be displayed as 12,345,678.
DOLLAR8.: Displays the data with a leading dollar sign and two decimal places. For example, 123.456 would be displayed as $123.46.
PERCENT8.: Displays the data as a percentage with two decimal places. For example, 0.123 would be displayed as 12.30%.
MMDDYY10.: Displays the data as a date in the format mm/dd/yyyy. For example, the numeric value 44570 would be displayed as 03/01/2023.
DATETIME20.: Displays the data as a datetime value in the format ddMonyyyy:hh:mm:ss. For example, the numeric value 1938256000 would be displayed as 01Jan2022:00:00:00.
HEX8.: Displays the data in hexadecimal format. For example, the numeric value 255 would be displayed as FF.
These are just a few examples of SAS numeric formats. There are many other formats available in SAS, depending on your specific needs. You can also create custom numeric formats in SAS using the FORMAT statement.