Hi
Looking the e-mail I remembered a question.
I saw that "select extract (week from now()::date)" will return the week number of current year. But, how can I convert a week to the first reference date. Ex:
select extract(week from '20050105'::date);  -- 5 Jan 2005
--Returns--
date_part |
1         |

It is the first week of year (2005), and how can I get what is the first date
references the week 1? Ex:
select ???? week 1
--should return---
date     |
20050103 |     -- 3 Jan 2005

Thank you.
Lucas Vendramin


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to