Parameters, Value
Month function extracts the month of a datetime value and returns that integer.
Syntax:
- Format: month(
<date>
) - Parameters: see table below
- Value: ATTR (number)
Name | Category | Specification | Description |
---|---|---|---|
date | ATTR(time) | / | The time value to be extracted from |
Constant
Example: return the month of "2020-01-02 00:05:32"
return month("2020-01-02 00:05:32")
Function
Example: find the month of the current system time
return month(now())
Alias
Example: find 10 customers, return dates of their birthdays
find().nodes({@customer}) as n
limit 10
return month(n.birthday)
Property
Example: find 10 customers whose birthdays are in current month
find().nodes({@customer}) as n
limit 10
return month(n.birthday)