Unexpected parse behaviour for date to timestamp conversion

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Unexpected parse behaviour for date to timestamp conversion
Date: 2003-03-07 16:33:10
Message-ID: 3E68C9C6.2070706@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have this field:

submit | timestamp(0) without time zone

The following two SQL queries return different values depending on
wether the date is quoted or not ...

I am assuming it is because the date is being parsed differently.

# select submit from invoices where submit <= 2003-03-09;
submit
----------
(0 rows)

# select submit from invoices where submit <= '2003-03-09';
submit
---------------------
2003-03-08 00:24:25
(1 row)

Why is the '2003-03-09' parsed/unserstood differently than 2003-03-09?

Thanks,

Jc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rod Taylor 2003-03-07 16:35:23 Re: [PATCHES] ALTER SEQUENCE
Previous Message Bruce Momjian 2003-03-07 16:27:13 Re: [PATCHES] ALTER SEQUENCE