Formats Supported with the PUT Function, by Category

Category Language Elements Description
Character $BASE64Xw. Format Converts character data into ASCII text by using Base 64 encoding.
$BINARYw. Format Converts character data to binary representation.
$CHARw. Format Writes standard character data.
$HEXw. Format Converts character data to hexadecimal representation.
$OCTALw. Format Converts character data to octal representation.
$QUOTEw. Format Writes data values that are enclosed in single quotation marks.
$REVERJw. Format Writes character data in reverse order and preserves blanks.
$REVERSw. Format Writes character data in reverse order and left aligns.
$UPCASEw. Format Converts character data to uppercase.
$w. Format Writes standard character data.
Date and Time DATEw. Format Writes SAS date values in the form ddmmmyy, ddmmmyyyy, or dd-mmm-yyyy.
DATEAMPMw.d Format Writes SAS datetime values in the form ddmmmyy:hh:mm:ss.ss with AM or PM.
DATETIMEw.d Format Writes SAS datetime values in the form ddmmmyy:hh:mm:ss.ss.
DAYw. Format Writes SAS date values as the day of the month.
DDMMYYw. Format Writes SAS date values in the form ddmm[yy]yy or dd/mm/[yy]yy, where a forward slash is the separator and the year appears as either 2 or 4 digits.
DDMMYYxw. Format Writes SAS date values in the form ddmm[yy]yy or ddXmmX[yy]yy, where X represents a specified separator and the year appears as either 2 or 4 digits.
DOWNAMEw. Format Writes SAS date values as the name of the day of the week.
DTDATEw. Format Expects a SAS datetime value as input and writes the SAS date values in the form ddmmmyy or ddmmmyyyy.
DTMONYYw. Format Writes the date part of a SAS datetime value as the month and year in the form mmmyy or mmmyyyy.
DTWKDATXw. Format Writes the date part of a SAS datetime value as the day of the week and the date in the form day-of-week, dd month-name yy (or yyyy).
DTYEARw. Format Writes the date part of a SAS datetime value as the year in the form yy or yyyy.
DTYYQCw. Format Writes the date part of a SAS datetime value as the year and the quarter, and separates them with a colon (:).
HHMMw.d Format Writes SAS time values as hours and minutes in the form hh:mm.
HOURw.d Format Writes SAS time values as hours and decimal fractions of hours.
JULIANw. Format Writes SAS date values as Julian dates in the form yyddd or yyyyddd.
MMDDYYw. Format Writes SAS date values in the form mmdd[yy]yy or mm/dd/[yy]yy, where a forward slash is the separator and the year appears as either 2 or 4 digits.
MMDDYYxw. Format Writes SAS date values in the form mmdd[yy]yy or mmXddX[yy]yy, where X represents a specified separator and the year appears as either 2 or 4 digits.
MMSSw.d Format Writes SAS time values as the number of minutes and seconds since midnight.
MMYYw. Format Writes SAS date values in the form mmM[yy]yy, where M is the separator and the year appears as either 2 or 4 digits.
MMYYxw. Format Writes SAS date values in the form mm[yy]yy or mmX[yy]yy. The x in the format name is a character that represents the special character. The special character separates the month and the year. That special character can be a hyphen (-), period (.), blank character, slash (/), colon (:), or no separator. The year can be either 2 or 4 digits.
MONNAMEw. Format Writes SAS date values as the name of the month.
MONTHw. Format Writes SAS date values as the month of the year.
MONYYw. Format Writes SAS date values as the month and the year in the form mmmyy or mmmyyyy.
NENGOw. Format Writes SAS date values as Japanese dates in the form e.yymmdd.
QTRw. Format Writes SAS date values as the quarter of the year.
QTRRw. Format Writes SAS date values as the quarter of the year in Roman numerals.
TIMEw.d Format Writes SAS time values as hours, minutes, and seconds in the form hh:mm:ss.ss using the military 24-hour clock.
TIMEAMPMw.d Format Writes SAS time values as hours, minutes, and seconds in the form hh:mm:ss.ss with AM or PM.
TODw.d Format Writes SAS time values and the time portion of SAS datetime values in the form hh:mm:ss.ss.
WEEKDATEw. Format Writes SAS date values as the day of the week and the date in the form day-of-week, month-name dd, yy (or yyyy).
WEEKDATXw. Format Writes SAS date values as the day of the week and date in the form day-of-week, dd month-name yy (or yyyy).
WEEKDAYw. Format Writes SAS date values as the day of the week.
YEARw. Format Writes SAS date values as the year.
YYMMw. Format Writes SAS date values in the form [yy]yyMmm, where M is the separator and the year appears as either 2 or 4 digits.
YYMMxw. Format Writes SAS date values in the form [yy]yymm or [yy]yy-mm. The x in the format name represents the special character that separates the year and the month. This special character can be a hyphen (-), period (.), slash(/), colon(:), or no separator. The year can be either 2 or 4 digits.
YYMMDDw. Format Writes SAS date values in the form yymmdd or [yy]yy-mm-dd, where a hyphen (-) is the separator and the year appears as either 2 or 4 digits.
YYMMDDxw. Format Writes date values in the form [yy]yymmdd or [yy]yy-mm-dd. The x in the format name is a character that represents the special character which separates the year, month, and day. This special character can be a hyphen (-), period (.), blank character, slash (/), colon (:), or no separator. The year can be either 2 or 4 digits.
YYMONw. Format Writes SAS date values in the form yymmm or yyyymmm.
YYQw. Format Writes SAS date values in the form [yy]yyQq, where Q is the separator, the year appears as either 2 or 4 digits, and q is the quarter of the year.
YYQxw. Format Writes SAS date values in the form [yy]yyq or [yy]yy-q. The x in the format name is a character that represents the special character that separates the year and the quarter of the year. This character can be a hyphen (-), period (.), blank character, slash (/), colon (:), or no separator. The year can be either 2 or 4 digits.
YYQRw. Format Writes SAS date values in the form [yy]yyQqr, where Q is the separator, the year appears as either 2 or 4 digits, and qr is the quarter of the year expressed in roman numerals.
YYQRxw. Format Writes date values in the form [yy]yyqr or [yy]yy-qr. The x in the format name is a character that represents the special character that separates the year and the quarter of the year. This character can be a hyphen (-), period (.), blank character, slash (/), colon (:), or no separator. The year can be either 2 or 4 digits and qr is the quarter of the year in roman numerals.
YYQZw. Format Writes SAS date values in the form [yy] yyqq. The year appears as 2 or 4 digits, and qq is the quarter of the year.
Numeric BESTw. Format SAS chooses the best notation.
BESTDw.p Format Prints numeric values, lining up decimal places for values of similar magnitude, and prints integers without decimals.
BINARYw. Format Converts numeric values to binary representation.
COMMAw.d Format Writes numeric values with a comma that separates every three digits and a period that separates the decimal fraction.
COMMAXw.d Format Writes numeric values with a period that separates every three digits and a comma that separates the decimal fraction.
Dw.p Format Prints variables, possibly with a great range of values, lining up decimal places for values of similar magnitude.
DOLLARw.d Format Writes numeric values with a leading dollar sign, a comma that separates every three digits, and a period that separates the decimal fraction.
DOLLARXw.d Format Writes numeric values with a leading dollar sign, a period that separates every three digits, and a comma that separates the decimal fraction.
Ew. Format Writes numeric values in scientific notation.
EUROw.d Format Writes numeric values with a leading euro symbol (€), a comma that separates every three digits, and a period that separates the decimal fraction.
EUROXw.d Format Writes numeric values with a leading euro symbol (€), a period that separates every three digits, and a comma that separates the decimal fraction.
FLOATw.d Format Generates a native single-precision, floating-point value by multiplying a number by 10 raised to the dth power.
FRACTw. Format Converts numeric values to fractions.
HEXw. Format Converts real binary (floating-point) values to hexadecimal representation.
IEEEw.d Format Generates an IEEE floating-point value by multiplying a number by 10 raised to the d th power.
NEGPARENw.d Format Writes negative numeric values in parentheses.
OCTALw. Format Converts numeric values to octal representation.
PERCENTw.d Format Writes numeric values as percentages.
PERCENTNw.d Format Produces percentages, using a minus sign for negative values.
ROMANw. Format Writes numeric values as roman numerals.
SIZEKw.d Format Writes a numeric value in the form nK for kilobytes.
SIZEKMGw.d Format Writes a numeric value in the form nKB for kilobytes, nMB for megabytes, or nGB for gigabytes.
VAXRBw.d Format Writes real binary (floating-point) data in VMS format.
w.d Format Writes standard numeric data one digit per byte.
YENw.d Format Writes numeric values with yen signs, commas, and decimal points.
Zw.d Format Writes standard numeric data with leading 0s.