Function dayOfWeek()
calculates the day of week of a time value and returns that integer, where 1 stands for Sunday, 2 stands for Monday, 3 stands for Tuesday, and so on.
Arguments:
- Time <datetime | timestamp | string>
Returns:
- Day of week <number>
Constant
Example: Return the day of week of "2020-01-02 00:05:32"
return dayOfWeek("2020-01-02 00:05:32") as dayOfWeek
Function
Example: Find the day of the week of the current system time
return dayOfWeek(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 dayOfWeek(e.time)
Property
Example: Find 10 @transfer
edges with their transfer time on weekend
find().edges({dayOfWeek(@transfer.time) in [1, 7]}) as e
limit 10
return e{*}