pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Joerdens <frank@x9media.com>
To: pgsql-sql@postgreSQL.org
Subject: datetime query issue
Date: Sat, 28 Aug 1999 15:35:07 +0200
Message-ID: <19990828153506.A18896@shark.x9media.com> (raw)

I'm not sure how to go about this: I want to find all rows with a timestamp 
between, say 6 a.m. and 10 p.m. for any number of days. The column format is
datetime. How do I extract the 'time of the day' information from this
column? What I can think of is to create a view for every single day where datetime
is > 6 and < 10 and then another query on all views together but that doesn't sound 
very elegant and would be a real memory hog for a large number of days.

Any better ideas?

Thanks

Frank




view thread (4+ messages)  latest in thread

Message-ID: <19990828153506.A18896@shark.x9media.com>
Permalink:  ../19990828153506.A18896@shark.x9media.com/
Also on:    postgresql.org/message-id/19990828153506.A18896@shark.x9media.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: frank@x9media.com
  Subject: Re: datetime query issue
  In-Reply-To: <19990828153506.A18896@shark.x9media.com>
  References: <19990828153506.A18896@shark.x9media.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox