Parameters, Value
Day of Week function calculates the day of week of a datetime value and returns that integer, and the correspondence between them is as follows:
Name | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
---|---|---|---|---|---|---|---|
Number | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Syntax:
- Format: day_of_week(
<date>
) - Parameters:see list below
- Value: ATTR (number)
Name | Category | Specification | Description |
---|---|---|---|
date | ATTR(time) | / | The time value to be extracted from |
Constant
Example: Return the day of week of "2020-01-02 00:05:32"
return day_of_week("2020-01-02 00:05:32") as dayOfWeek
Function
Example: find the day of the week of the current system time
return day_of_week(now())
Alias
Example: find 10 @trasnfer
edges, return the day of the week of the transfer time
find().edges({@transfer}) as e
limit 10
return day_of_week(e.time)
Property
Example: find 10 @transfer
edges with their transfer time on weekend
find().edges({day_of_week(@transfer.time) in [1, 7]}) as e
limit 10
return e{*}