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

SQL Anywhere 11.0.1 (日本語) » Ultra Light データベース管理とリファレンス » Ultra Light SQL リファレンス » Ultra Light SQL 関数 » SQL 関数 (P ~ Z)

 

YMD 関数 [日付と時刻]

指定した年、月、日に相当する日付値を返します。値は -32768 ~ 32767 の small integer です。

構文
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 );