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

SQL Anywhere 11.0.0 » UltraLite - Database Management and Reference » UltraLite SQL Reference » UltraLite SQL function reference » Alphabetical list of functions


DATENAME function [Date and time]

Returns the name of the specified part (such as the month June) of a datetime value, as a character string.

DATENAME( date-part, date-expression )
  • date-part   The date part to be named.

    For a complete listing of allowed date parts, see Date parts.

  • date-expression   The date for which the date part name is to be returned. The date must contain the requested date-part.


The DATENAME function returns a string, even if the result is numeric, such as 23 for the day.

Standards and compatibility
  • SQL/2003   Vendor extension.


The following statement returns the value May.

SELECT DATENAME( month, '1987/05/02' );