Re: SELECT on a table with Time values - Mailing list pgsql-general

From Dann Corbit
Subject Re: SELECT on a table with Time values
Date
Msg-id D425483C2C5C9F49B5B7A41F8944154702961FA1@postal.corporate.connx.com
Whole thread Raw
In response to SELECT on a table with Time values  (Anderson dos Santos Donda <andersondonda@gmail.com>)
List pgsql-general

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Anderson dos Santos Donda
Sent: Wednesday, February 04, 2009 12:05 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] SELECT on a table with Time values

 

Hi all!!

I have a simple table with two column. The first column is a time type and the other is a integer type. This table have datas from each minute of day.

Example : 15:00:00, 15:01:00, 15:02:00 etc...

I want a SELECT command  wich return for me the datas from each five minutes of day.

Example: 15:00:00, 15:05:00, 15:10:00, 15:15:00 etc


There is a way to do this?

>> 

How about:

SELECT integer_column, timestamp_column FROM my_table

WHERE EXTRACT(MINUTE FROM timestamp_column) % 5 = 0

<< 

pgsql-general by date:

Previous
From: Anderson dos Santos Donda
Date:
Subject: SELECT on a table with Time values
Next
From: Richard Huxton
Date:
Subject: Re: case sensitive db name?