Re: [GENERAL] Timestamp comparison with string in some special cases

2007-11-19 Thread Tom Lane
Dragan Matic <[EMAIL PROTECTED]> writes: > And isn't this: > SELECT * from table where timestamp_column < to_timestamp('11/19/2007 > 15:46:09 PM','MM/DD/ HH24:MI:SS') > just doing the same thing that implicit string to timestamp conversion > should have done in the first case? No. The ent

Re: [GENERAL] Timestamp comparison with string in some special cases

2007-11-19 Thread Sam Mason
On Mon, Nov 19, 2007 at 06:03:36PM +0100, Dragan Matic wrote: > Sam Mason wrote: > >On Mon, Nov 19, 2007 at 04:52:10PM +0100, Dragan Matic wrote: > > > >>select * from table where timestamp_column < '11/19/2007 15:46:09 PM' > >> > > > >Maybe the to_timestamp() function would help you: > > > >

Re: [GENERAL] Timestamp comparison with string in some special cases

2007-11-19 Thread Dragan Matic
Sam Mason wrote: On Mon, Nov 19, 2007 at 04:52:10PM +0100, Dragan Matic wrote: select * from table where timestamp_column < '11/19/2007 15:46:09 PM' Maybe the to_timestamp() function would help you: SELECT to_timestamp('11/19/2007 15:46:09 PM','MM/DD/ HH24:MI:SS') -> 2007-11

Re: [GENERAL] Timestamp comparison with string in some special cases

2007-11-19 Thread Sam Mason
On Mon, Nov 19, 2007 at 04:52:10PM +0100, Dragan Matic wrote: > select * from table where timestamp_column < '11/19/2007 15:46:09 PM' Maybe the to_timestamp() function would help you: SELECT to_timestamp('11/19/2007 15:46:09 PM','MM/DD/ HH24:MI:SS') -> 2007-11-19 15:46:09+00 That just

Re: [GENERAL] Timestamp comparison with string in some special cases

2007-11-19 Thread Andreas Kretschmer
Dragan Matic <[EMAIL PROTECTED]> schrieb: > 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_colu

[GENERAL] Timestamp comparison with string in some special cases

2007-11-19 Thread Dragan Matic
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 form