teradata day of week code example
Example: teradata week number
datecol - ((datecol - DATE '0001-01-01') MOD 7) -- week starts on monday
datecol - ((datecol - DATE '0001-01-07') MOD 7) -- week starts on sunday
datecol - ((datecol - DATE '0001-01-01') MOD 7) -- week starts on monday
datecol - ((datecol - DATE '0001-01-07') MOD 7) -- week starts on sunday