Timestamp comparison with string in some special cases - Mailing list pgsql-general

From Dragan Matic
Subject Timestamp comparison with string in some special cases
Date
Msg-id 4741B12A.5030901@panforma.co.yu
Whole thread Raw
Responses Re: Timestamp comparison with string in some special cases
Re: Timestamp comparison with string in some special cases
List pgsql-general
I have just found out that when comparing timestamp with time value
where time value is represented in 24h format + AM/PM sign doesn't work
always.
for instance, the following query works in this format:

select * from table where timestamp_column < '11/19/2007 3:46:09 PM'

and also in this format

select * from table where timestamp_column < '11/19/2007 15:46:09'

BUT: if time is presented in this format, postgres returns an error

ERROR: date/time field value out of range

select * from table where timestamp_column < '11/19/2007 15:46:09 PM'

Now, I know that 24 time format + AM/PM is redundant, but this is how
windows clock format is set up in few of our customers, and this is what
is sent to postgres. We will alter this presentation through our client
program, but is there a way to make postgres accept values like these?
Postgres is version 8.2.3 on fedora 7 (64-bit).

Dragan Matic

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: convert custom datatype to array
Next
From: "Josh Harrison"
Date:
Subject: