Re: [SQL] `statistical' aggregate functions etc.
Aleksey Dashevsky <postgres@luckynet.co.il>
From: Aleksey Dashevsky <postgres@luckynet.co.il>
To: Ulf Mehlig <umehlig@uni-bremen.de>
Cc: pgsql-sql@postgreSQL.org
Date: 1998-10-22T09:45:50Z
Lists: pgsql-sql
On Mon, 19 Oct 1998, Ulf Mehlig wrote:
>
> I'm a novice to postgresql, so please excuse if I'm addressing to the
> wrong mailing list!
>
.....
>
> Other question: I'm used to use DB2/2, and DB2/2 has functions like
> "month(some_date)" and "hour(some_timestamp)". Are there equivalents
> in postgresql?
>
I think you should try date_part function, which is described in
pgintro(1) man page:
select date_part('month', some_date);