type conversion date <-> timestamp

From: Ulrich Wisser <ulrich(dot)wisser(at)relevanttraffic(dot)se>
To: pgsql-general(at)postgresql(dot)org
Subject: type conversion date <-> timestamp
Date: 2004-05-17 09:49:18
Message-ID: 40A88A9E.6070603@relevanttraffic.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

today I started to wonder about type conversion. I want to get all rows
of a table dated between two given dates. Until now I use

select * from mytable where to_date('20040115', 'YYYYMMDD') <= timestamp
and timestamp <= to_date('20040215', YYYYMMDD')

Does that query include the 15th January as well as the 15th February?

TIA

Ulrich

Browse pgsql-general by date

  From Date Subject
Next Message Milos Prudek 2004-05-17 10:24:38 serial autoincrement and related table
Previous Message Nick Barr 2004-05-17 08:06:26 Re: table column information