= SPSS Formats = The '''`FORMATS`''' command sets [[SPSS/DataFormats|print and write formats]] for a variable. <> ---- == Usage == {{{ formats foo bar baz (F1.0). formats ham (ADATE10) spam eggs (A10). }}} Note that all variables listed ''together'' must have the same type and, if [[SPSS/DataTypes#String_Data|strings]], the same width. Note that strings can only be formatted between `A` and `AHEX` formats, and the `AHEX` length must be exactly twice the `A` length. The `FORMATS` command cannot be used to resize a string variable. ---- == Data Model == The `FORMATS` command executes immediately. Pending transformations are ''not'' executed and the active dataset is ''not'' read. ---- == See also == [[https://www.gnu.org/software/pspp/manual/html_node/FORMATS.html|PSPP manual for FORMATS]] ---- CategoryRicottone