How to get number of the week from datetime?

From: "Hojdar Karel Ing(dot)" <karel(dot)hojdar(at)synergie(dot)cz>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: How to get number of the week from datetime?
Date: 2000-01-14 13:22:48
Message-ID: F0F2C79F20CFD2119D07080009DC528431E155@NT_MAIN_SG
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

how I can get some agregates (avg, min, max) for whole week (in specified
year)?
For example from table with two columns : time datetime and value float8.
And I want to get average of value based on whole weeks. If I try to use
date_part('week',time) - Postgresql doesn't recognize word 'week'.

Thanks Karel

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Compte utilisateur Sultan-advl 2000-01-14 13:29:34 psql ERROR : Character Types Tuple is too big: size xxxxx
Previous Message The Hermit Hacker 2000-01-14 13:18:52 Re: [GENERAL] Database synchronisation over the internet...