| From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Between and miliseconds (timestamps) |
| Date: | 2006-11-10 14:44:58 |
| Message-ID: | 20061110144458.GA2909@a-kretschmer.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-11-10 15:07:44 | Re: Constraint on multicolumn index |
| Previous Message | Ezequias Rodrigues da Rocha | 2006-11-10 14:28:53 | Between and miliseconds (timestamps) |