SQL Server, trying to get day of week via a deterministic UDF.
Im sure this must be possible, but cant figure it out.
UPDATE: SAMPLE CODE..
C
The day of the week? Why don't you just use DATEPART?
DATEPART(weekday, YEAR_DATE)