datename()

Scalar. Converts a date value into a string.

Syntax

datename ( datevalue )

Parameters

datevalue

A date or bigdatetime.

Usage

Converts a date value to a string of the form 'YYYY-MM-DD'. The function takes a date or bigdatetime as its argument, and the function returns a string.

Example

datename (undate ('2010-03-03 12:34:34')) returns '20100303'.