[廔]Oracle格式化函ex
Postgres 把戏化函数供给一套有效的工具用于把各类数据典范(日期/时间,int,float,numeric)转换成把戏化的字符串和反过来从把戏化的字符串转换本钱初的数据典范。 注重:一切把戏化函数的第两个参数是用于转换的模板。 表 5-7. 把戏化函数 函数 返回 描写 例子 >to_char(timestamp, text) text 把 timestamp 转换成 string to_char(timestamp "now","HH12:MI:SS") to_char(int, text) text 把 int4/int8 转换成 string to_char(125, "999") to_char(float, text) text 把 float4/float8 转换成 string to_cha