Forum OpenACS Q&A: Re: Postgres to_date bug?

Collapse
9: Re: Postgres to_date bug? (response to 1)
Posted by Nima Mazloumi on
Problem solution found here:
https://openacs.org/forums/message-view?message_id=111938

PG required to_timestamp if time is important while Oracle uses to_date in both cases.

Collapse
10: Re: Postgres to_date bug? (response to 9)
Posted by Jeff Davis on
you can also just not convert it at all eg:
select '2004-06-04 18:57:00+01' - now();
         ?column?
--------------------------
 -3 days -00:00:25.633516
(1 row)