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 函数 (P-Z)

 

YMD 函数 [Date and time]

返回对应于给定年、月、日的日期值。值是 -32768 到 32767 的小整数。

语法
YMD( 
integer-expression1,
integer-expression2,
integer-expression3 )
参数
  • integer-expression1   年。

  • integer-expression2   表示月份的数字。如果月份超出 1-12 的范围,则会调整年份。

  • integer-expression3   天数。日可以是任意整数;日期可相应调整。

返回值

DATE

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

示例

以下语句返回值 1998-06-12。

SELECT YMD( 1998, 06, 12 );

如果值超出其正常范围,则会调整日期。例如,以下语句返回值 2000-03-01。

SELECT YMD( 1999, 15, 1 );