swat.SASFormatter.format¶
-
SASFormatter.
format
(value, sasfmt=None, width=12)¶ Format the given value
Parameters: - value : any
The value to format.
- sasfmt : string, optional
The SAS format to use.
- width : int, optional
The width of the field to format to.
Returns: - string
Formatted form of input value.
Examples
>>> fmt = SASFormatter()
>>> fmt.format(123.45678, 'F8.2') 123.45
>>> fmt.format(123.45678, 'DATE.') '03-MAY-1960'