FORMAT - Format Conversion

  • Last update: May 21, 2025
  • Overview

    Syntax

    FORMAT(value/date, format)

    Returns the specified format of a value or date as text.

    Parameter 1

    value/date

    An object that needs to be formatted, which can be a value/date

    Parameter 2

    Format

    Object format, such as ##0,MM/dd/yyyy

    Type of the Returned Value

    Text

    Notes

    • If any parameter is NULL, the result is NULL.

    Example

    FormulaResult

    FORMAT(1234.5,"#,##0.00")

    1234.50

    FORMAT(1234.5,"#,##0")

    1234

    FORMAT(1234.5,"¥#,##0.00")

    ¥1234.50

    FORMAT(1.5,"0%")

    150%

    FORMAT(1.5,"0.000%")

    150.000%

    FORMAT(6789,"##0.0E0")

    6.789E3

    FORMAT(6789,"0.00E00")

    6.79E03

    FORMAT(date(2007,1,1),"EEEEE,MMMMMdd,yyyy")

    Monday,January01,2007

    FORMAT(date(2007,1,13),"MM/dd/yyyy")

    01/13/2007

    FORMAT(date(2007,1,13),"M-d-yy")

    1-13-07

    FORMAT(time(00,23,56),"H:mm:ss")

    Note: This example is added in FineDataLink of V4.1.11.3.

    0:23:56

    FORMAT(time(00,23,56),"HH:mm:ss")

    Note: This example is added in FineDataLink of V4.1.11.3.

    00:23:56

    For example, if you want to remove the hour, minute, and second data from a date field, you can add a New Calculation Column operator, enter the field name, and enter the formula TODATE(FORMAT(Column to be formatted,"yyyy-MM-dd")), as shown in the following figure.

    3-1.png

    The following figure shows the date column Format with the hour, minute, andsecond data removed.

    3-2.png

    附件列表


    主题: Data Development - Scheduled Task
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy