partial time stamp query - Mailing list pgsql-general

From Kirk Wythers
Subject partial time stamp query
Date
Msg-id 12DA705A-12A2-490E-A922-0F475A450A55@umn.edu
Whole thread Raw
Responses Re: partial time stamp query  (Misa Simic <misa.simic@gmail.com>)
List pgsql-general
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=85

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=20

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=85 in other words all days from July of 2010.=20

Any suggestions would be much appreciated.=20=

pgsql-general by date:

Previous
From: Alexander Farber
Date:
Subject: Re: Adding PRIMARY KEY: Table contains duplicated values
Next
From: Misa Simic
Date:
Subject: Re: partial time stamp query