Re: partial time stamp query - Mailing list pgsql-general

From Misa Simic
Subject Re: partial time stamp query
Date
Msg-id CAH3i69nyVRP--VXGcKjGY2MRL=ZcDKtu+wMSwrceqnJhvZ3fkA@mail.gmail.com
Whole thread Raw
In response to partial time stamp query  (Kirk Wythers <wythe001@umn.edu>)
Responses Re: partial time stamp query  (Kirk Wythers <kirk.wythers@gmail.com>)
List pgsql-general
WHERE derived_tsoil_fifteen_min_stacked.time2::date =3D '2010-07-07'::date

On Monday, February 4, 2013, Kirk Wythers wrote:

> I am trying to write a query that grabs one particular day from a
> timestamp column. The data are ordered in 15 minute chunks like this:
>
> 2010-07-07 12:45:00
> 2010-07-07 13:00:00
> 2010-07-07 13:15:00
> 2010-07-07 13:30:00
> etc=E2=80=A6
>
> If I wanted all records from july 7th 2010, I would expect 4 x 24 =3D 96
> records per day.
>
> I have tried the '=3D' operator, like this
>
> WHERE derived_tsoil_fifteen_min_stacked.time2 =3D '2010-07-07*'
>
> but that grabs nothing, and using the '~' operator grabs everything with =
a
> 2010 or 07 in it=E2=80=A6 in other words all days from July of 2010.
>
> Any suggestions would be much appreciated.
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org<javascr=
ipt:;>
> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

pgsql-general by date:

Previous
From: Kirk Wythers
Date:
Subject: partial time stamp query
Next
From: Adrian Klaver
Date:
Subject: Re: Adding PRIMARY KEY: Table contains duplicated values