Command Reference : String and Date Function Reference
  
 
@datepart
Syntax: @datepart(d1, fmt)
Argument 1: date number, d1
Argument 2: date format string, fmt
Return: number
Returns a numeric part of a date number given by fmt, where fmt is a date format string component.
Example:
Consider the d1 date value 730110.5 (noon, December 23, 1999). The @datepart values for
@datepart(730110.5, "dd")
@datepart(730110.5, "w")
@datepart(730110.5, "ww")
@datepart(730110.5, "mm")
@datepart(730110.5, "yy")
are 23 (day of the month), 1 (day of the week), 52 (week in the year), 12 (month in the year), and 99 (year), respectively).
See “Dates” and “Date Formats”for additional details on date numbers and date format strings.