Archives of the TeradataForum
Message Posted: Sat, 10 Mar 2012 @ 20:08:31 GMT
Subj: | | Finding day of the week. |
|
From: | | filipsil |
I have a TIMESTAMP field and would like to find the day of the week. But I'm not getting, anyone done something similar?
Select
CASE (( ?cast('2011-12-18 12:13:36' as date) - DATE '1900-01-01') Mod 7) + 1
WHEN 0 THEN 'Sun'
WHEN 1 THEN 'Mon'
WHEN 2 THEN 'Tue'
WHEN 3 THEN 'Wed'
WHEN 4 THEN 'Thu'
WHEN 5 THEN 'Fri'
WHEN 6 THEN 'Sat' END
att,
Filipe da Silva
IBM Brasil - GBS / AS
|