pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-sql@postgresql.org
Subject: Re: Between and miliseconds (timestamps)
Date: Fri, 10 Nov 2006 15:44:58 +0100
Message-ID: <20061110144458.GA2909@a-kretschmer.de> (raw)
In-Reply-To: <55c095e90611100628m1322eea5jeeca3a94d90e1eb1@mail.gmail.com>
References: <55c095e90611100628m1322eea5jeeca3a94d90e1eb1@mail.gmail.com>

am  Fri, dem 10.11.2006, um 12:28:53 -0200 mailte Ezequias Rodrigues da Rocha folgendes:
> Hi list,
> 
> I noticed that when we use the keyword between in SQL statements we must
> considerer all the miliseconds with 6 digits.
> 
> I would like to know if we want to make a day selection we must use allways the
> max of possibilities like:
> 
> 
> select * from base.table
> where when
> between
> '2006-09-06 00:00:00.000000'
> and
> '2006-09-06 23:59:59.999999'
> order by 2
> 
> Is there a simplest way or not ?

Yes. ... where when = '2006-09-06'::date.



Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net



view thread (6+ messages)  latest in thread

Message-ID: <20061110144458.GA2909@a-kretschmer.de>
Permalink:  ../20061110144458.GA2909@a-kretschmer.de/
Also on:    postgresql.org/message-id/20061110144458.GA2909@a-kretschmer.de

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: andreas.kretschmer@schollglas.com
  Subject: Re: Between and miliseconds (timestamps)
  In-Reply-To: <20061110144458.GA2909@a-kretschmer.de>

* 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