Search Postgresql Archives

Re: Timestamp comparison with string in some special cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/YYYY HH24:MI:SS')
    -> 2007-11-19 15:46:09+00

That just ignores the AM/PM flag, which may or may not be what you want
to do.


  Sam

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux