DATENAME (Azure Stream Analytics)

 

Updated: April 22, 2016

Applies To: Azure

Returns a character string that represents the specified datepart of the specified date.

Syntax

DATENAME ( datepart , date )  

datepart

Is any valid expression.

data_type

Is the part of the date to return. The following table lists all valid datepart arguments.

datepartAbbreviations
yearyy, yyyy
quarterqq, q
monthmm, m
dayofyeardy, y
daydd, d
weekwk, ww
weekdaydw, w
hourhh
minutemi, n
secondss, s
millisecondms
microsecondmcs

date

Is an expression that can be resolved to a datetime. date can be an expression, column expression, or string literal.

nvarchar(max)

SELECT DATENAME (month, EntryTime)  
FROM Input TIMESTAMP BY EntryTime  
WHERE Toll > 5  
  

Show: