Contents Index DATENAME function [Date and time] DATETIME function [Date and time]

ASA SQL Reference
  SQL Functions
    Alphabetical list of functions

DATEPART function [Date and time]


Function 

Returns the value of part of a datetime value.

Syntax 

DATEPART ( date-partdate-expression )

Parameters 

date-part    The date-part to be returned.

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

date-expression    The date for which the part is to be returned. The date must contain the date-part field.

Standards and compatibility 
Example 

The following statement returns the value 5.

SELECT datepart( month , '1987/05/02' )

Contents Index DATENAME function [Date and time] DATETIME function [Date and time]