Re: tricky date manipulations?

From: Frank Bax <fbax(at)execulink(dot)com>
To: pgsql-general(at)postgreSQL(dot)org
Cc: Alfred Perlstein <bright(at)wintelcom(dot)net>
Subject: Re: tricky date manipulations?
Date: 2000-04-07 01:29:19
Message-ID: 3.0.6.32.20000406212919.0149c100@execulink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 05:35 PM 4/06/00 -0700, you wrote:
>select from a table several records and group by a date column.

just cast your datetime or timestamp (hour) field into a date...

select hour::date, sum(whatever) from table group by hour::date;

Frank

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Perréal 2000-04-07 13:23:52 Splitting one big table into smaller ones
Previous Message Alfred Perlstein 2000-04-07 00:35:28 tricky date manipulations?