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

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - SQL 参考 » 使用 SQL » SQL 函数 » SQL 函数 (A-D)

 

DATETIME 函数 [Date and time]

将表达式转换成时间戳。

语法
DATETIME( expression )
参数
  • expression   要转换的表达式。通常是字符串。

返回值

TIMESTAMP

注释

试图转换数字值时会返回错误。

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

示例

以下语句返回值为 1998-09-09 12:12:12.000 的时间戳。

SELECT DATETIME( '1998-09-09 12:12:12.000' );