UK[?f?:m?t] US[?f?:rm?t]

n. (Publication) format; [Auto] (Data arrangement) form; TV program overall arrangement (or plan)

vt. To format; to arrange the pattern of…; to design the layout of…

vi. To design a layout

Third person singular: formats Plural: formats Present participle: formatting Past Formula: formatted Past participle: formatted

mysql FORMAT() function syntax

Function:Format the display of fields.

Syntax: SELECT FORMAT(column_name,format) FROM table_name

Parameters:

ParameterDescription
column_name Required. The field to format.
format Required. Specify the format.

mysql FORMAT() function example

//顯示每天日期所對應(yīng)的名稱和價格(日期的顯示格式是 "YYYY-MM-DD")。
SELECT ProductName, UnitPrice, FORMAT(Now(),'YYYY-MM-DD') as PerDate FROM Products;