{ "name": "day_of_week", "type": "function", "groups": ["Date and Time"], "description": "Returns the day of the week for a specified date or datetime. The returned value ranges from 0 to 6, where 0 corresponds to a Sunday and 6 to a Saturday.", "arguments": [{ "arg": "date", "description": "date or datetime value" }], "examples": [{ "expression": "day_of_week(to_date('2015-09-21'))", "returns": "1" }], "tags": ["week", "day", "specified", "datetime", "corresponds", "ranges", "date", "saturday"] }