LOLL2=# SELECT to_char('2007-12-31'::DATE, 'YYYYIW'); to_char --------- 200701 (1 row) 2007-12-31 should be week 2008-01 regards, Daniel. ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings