vanessa wrote: > hi guys, > i was just wondering if it was at all possible to turn a year and a given > week number into a real date just using postgresql commands? > > > e.g. if i have year = 2004 and week = 1, > can i turn that into say 2004-01-01 (so that the specified > date is the one for the beginning of week 1 in the year 2004 > > > thanks > vanessa :)
I think you're looking for this: select to_date('01 2004', 'WW YYYY'); to_date ------------ 2004-01-01 (1 row) select to_date('02 2004', 'WW YYYY'); to_date ------------ 2004-01-08 (1 row) -- Alban Hertroys [EMAIL PROTECTED] magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede // Integrate Your World // ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/