Format specifiers define how LabVIEW functions interpret strings. Understand the terminology of format specifiers and how they differ when used for formatting strings or scanning strings.

  • Format string—Input parameter to LabVIEW functions that format strings or scan strings. Can include format specifiers and literal strings that you want the function to insert into output strings.

    For functions that scan strings, the format string might also be called a scan string.

  • Format specifier—Code beginning with the % delimiter and ending with a letter that indicates how to format a string. Used within the format string input of LabVIEW functions.

    Format specifiers might also be referred to as percent codes or format codes.

    For details on the specific components of format specifiers and what they do, refer to Format Specifier Syntax.

  • Delimiter—Character within a format specifier that separates parts of format specifiers or that separates multiple format specifiers. Format specifiers use two delimiter characters:
    • %: Begins a format specifier.
    • >: Denotes the end of the Embedded Time Format element within a format specifier. Embedded Time Format begins with <.
  • Modifier—Symbol that modifies the format specifier, such as $ or #. Optional component of a format specifier.
  • Conversion code—One of a set of supported characters that specifies how to scan or format a parameter. Required component of a format specifier. Conversion codes primarily relate to a specific type of data. Some conversion codes can interpret multiple types of data.
  • Literal string—Text that you want to appear in the output string that a function that uses a format specifier creates.

    You can escape delimiter characters. To embed a literal % character in a string, use %%. To embed a literal > character in a string, use \>. Refer to Backslash ('\') Codes Display topic for more information about how LabVIEW interprets backslash codes.

  • LabVIEW includes two types of functions that use format specifiers: formatting functions and scanning functions. These two types of functions perform converse actions.

  • Formatting—Converts LabVIEW typed data into a formatted string. Format specifiers for formatting functions describe how to format the output string. For example, you can format LabVIEW timestamp data to present the time information in a specific way. The following functions format strings:
    • Format Into String function
    • Array To Spreadsheet String function
    • Format Value function
    • Format Into File function
  • Scanning—Parses input strings to extract LabVIEW typed data. Format specifiers for scanning functions describe how to interpret input string data to produce typed data. For example, you can scan a string that includes time information to extract LabVIEW timestamp data. The following functions scan strings:
    • Scan From String function
    • Spreadsheet String To Array function
    • Scan Value function
    • Scan From File function
  • The available syntax for format specifiers differs between these two categories.