|
|
Archives of the TeradataForum
Message Posted: Thu, 22 May 2003 @ 15:08:11 GMT
Subj: | | Re: Extract day of week from date |
|
From: | | Updyke, Nathan |
select case when (date - date '1900-01-01') mod 7 = 0 then 'Monday'
when (date - date '1900-01-01') mod 7 = 1 then 'Tuesday'
when (date - date '1900-01-01') mod 7 = 2 then 'Wednesday'
when (date - date '1900-01-01') mod 7 = 3 then 'Thursday'
when (date - date '1900-01-01') mod 7 = 4 then 'Friday'
when (date - date '1900-01-01') mod 7 = 5 then 'Saturday'
when (date - date '1900-01-01') mod 7 = 6 then 'Sunday'
end as DAY_OF_WEEK;
| |