In scenarios where frequent format conversion is required during data analysis, FineBI provides the FORMAT function specially for field formatting.
Grammar
FORMAT(object,format)
Returns an object in a specified format.
Parameter 1
object
Object to be formatted, the type of which can be String, Number, or Object (Date, Time commonly used)
Parameter 2
format
Object format
The function supports two parameters. For extracted data, the first parameter can be of any type and the second is of the text type.
For real-time data, the first parameter is of the date type and the second is of the text type.
To format date through the FORMAT function, date must be in yy/yyyy - M/MM - d/dd format.
The FORMAT function is not supported for the direct connect Kyligence database (enterprise edition).
The following section takes 2021-06-15 as an example to introduce common FORMAT parameters, including date-type and numeric parameters.
For example, if you want to remove the hour data from the date string,
you can create a new formula column, name it, and enter the formula TODATE(FORMAT(column to be formatted,"yyyy-MM-dd")). The result is shown in the figure below.
Take 1234.56 as an example.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy