pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Byerley <mrbyerle@uwaterloo.ca>
To: pgsql-sql@postgresql.org
Subject: Datetime Query
Date: Thu, 15 Feb 2001 10:31:52 -0500
Message-ID: <5.0.2.1.0.20010215102652.00a140a0@admmail.uwaterloo.ca> (raw)

I need to create a query which will select a request_no between Data1 and 
Date2 so...

SELECT request_no FROM request where status_code ='C' and (completed_date 
between 01/01/2000 and 01/01/2001);

The problem I have run into is that the completed_date field is a datetime 
format (not by my own design) and I am having some problems extracting just 
the request_no's between those dates.
I have tried a few extract month,day,year clauses with no success. If 
anyone has an idea I would appreciate it!
Thanks in advance.
Mark




view thread (2+ messages)  latest in thread

Message-ID: <5.0.2.1.0.20010215102652.00a140a0@admmail.uwaterloo.ca>
Permalink:  ../5.0.2.1.0.20010215102652.00a140a0@admmail.uwaterloo.ca/
Also on:    postgresql.org/message-id/5.0.2.1.0.20010215102652.00a140a0@admmail.uwaterloo.ca

 · 

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: mrbyerle@uwaterloo.ca
  Subject: Re: Datetime Query
  In-Reply-To: <5.0.2.1.0.20010215102652.00a140a0@admmail.uwaterloo.ca>
  References: <5.0.2.1.0.20010215102652.00a140a0@admmail.uwaterloo.ca>

* 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