Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Analytics and Notifications for PI System Explorer (PI Server 2024 R2)

Format

  • Last UpdatedJan 11, 2023
  • 1 minute read

Convert a number to string according to a format expression.

Syntax

Format(x, format [,culture])

Arguments

  • x

    An integer or a real number

  • format

    Format-control string, similar to that used by the C language function Sprintf

  • culture

    Optional. Culture name string, enclosed in double quotation marks. Example values include "de-DE", "ja-jp", "pt-br", "zh-cn". Use "" to specify the culture-invariant setting (the default setting).

Returns

A formatted string

Example

  • Format(1234.567, "%10.2f", "de-DE")

    [Returns "1234,57", a formatted string]

  • Format(45, "%3.3d")

    [Returns "045"]

In This Topic
TitleResults for “How to create a CRG?”Also Available in