Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » UltraLite - 数据库管理和参考 » UltraLite SQL 参考 » UltraLite SQL 函数 » SQL 函数 (A-D)

 

DATEFORMAT 函数 [Date and time]

返回以指定格式表示日期表达式的字符串。

语法
DATEFORMAT( datetime-expression, string-expression )
参数
  • datetime-expression   要转换的日期时间。

  • string-expression   转换后的日期格式。

    有关日期格式说明的信息,请参见UltraLite date_format 创建参数

返回值

VARCHAR

注释

任何允许的日期格式都可用于字符串表达式。

标准和兼容性
  • SQL/2003   服务商扩充。

示例

以下语句返回值 Jan 01, 1989。

SELECT DATEFORMAT( '1989-01-01', 'Mmm dd, yyyy' );