Converts a date or timestamp to a number representing the day of the week (Monday is 1, and Sunday is 7).
| ||An expression that evaluates to a |
This example below finds the day of week number for April 22, 1975. The string first needs to be transformed to
DATE type using the
SELECT TO_DAY_OF_WEEK(CAST('1975/04/22' AS DATE)) as res;