Oracle to_char格式化函数.doc

Oracle to_char格式化函数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_char(125.8, 999D9) to_char(numeric, text) text 把 numeric 转换成 string to_char(numeric -125.8, 999D99S) to_date(text, text) date 把 string 转换成 date to_date(05 Dec 2000, DD Mon YYYY) to_timestamp(text, text) date 把 string 转换成

文档评论(0)

1亿VIP精品文档

相关文档