Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

How can I get the first and last date of a week, based on the week number and the year



Hello !

I have a week number (ISO 8601) and a year, based on theses values, I would like to get the first and the last dates of that week.

How I can do that ?

The only solution is doing a big generate_series to build a subset that contains the week of all the dates between the 01/01 || year and the 31/12 || year. But I find that solution quite dirty and ressources consumming.

Is there a cleanest way to do that ?

Many thanks in advance !

Regards,

--
Bruno Baguette - bruno(dot)baguette(at)gmail(dot)com





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group