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

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - SQL Reference » Using SQL » SQL functions » SQL functions (P-Z)

 

YMD function [Date and time]

Returns a date value corresponding to the given year, month, and day of the month. Values are small integers from -32768 to 32767.

Syntax
YMD( 
integer-expression1,
integer-expression2,
integer-expression3 )
Parameters
  • integer-expression1   The year.

  • integer-expression2   The number of the month. The year is adjusted if the month is outside the range 1-12.

  • integer-expression3   The day number. The day can be any integer; the date is adjusted.

Returns

DATE

Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following statement returns the value 1998-06-12.

SELECT YMD( 1998, 06, 12 );

If the values are outside their normal range, the date is adjusted. For example, the following statement returns the value 2000-03-01.

SELECT YMD( 1999, 15, 1 );