CONVERT函数

来源:互联网 发布:剑三炮哥捏脸数据 编辑:程序博客网 时间:2024/04/30 09:43

CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

expression : 任何合法的sql表达式

data_type :任何sql类型

Is the target system-supplied data type, including bigint and sql_variant. User-defined data types cannot be used. For more information about available data types, see Data Types.

style : 日期格式
20 or 120 (*)  ODBC canonical yyyy-mm-dd hh:mi:ss(24h)
21 or 121 (*)  ODBC canonical (with milliseconds) yyyy-mm-dd hh:mi:ss.mmm(24h)  

原创粉丝点击