decode of date..subtracting weeks
From: DiggidyMack69 <DiggidyMack69_at_hotmail.com>
Date: 19 Sep 2002 08:21:06 -0700
Message-ID: <c86ce4f.0209190721.4022c5cd_at_posting.google.com>
08/31/2001
Date: 19 Sep 2002 08:21:06 -0700
Message-ID: <c86ce4f.0209190721.4022c5cd_at_posting.google.com>
Hey folks,
'08/31/2002' is the last day of week 35 in 2002.
I know how to walk back in days like so...but what about weeks then
days.
SQL> select
TO_CHAR((T
I am looking for the best way to get from one date say '08/31/2002'
the first day of the week 51 weeks beforehand (hence a ful year). I'm
trying to get it in a single decode line. I'm pretty sure the value
should come up as '08/26/2001'.
2 to_char((to_date('08/31/2002','MM/DD/YYYY')-365),'MM/DD/YYYY')
3 from dual;
08/31/2001
ideas anyone???
thanks in advance for your help,
DM
diggidymack69_at_hotmail.com
Received on Thu Sep 19 2002 - 17:21:06 CEST