Forum OpenACS Q&A: Response to date_add, returns "wrong" dates

Collapse
Posted by Mark Steele on
To get better precision to handle hours/minutes/seconds, you simply
need to modify the original functions and change
'YYYY-MM-DD' to 'YYYY-MM-DD HH:MI:SS'

This will probably preserve the hours/minutes/seconds of the original
date. If you want absolute precision, you'll need to do something fancier.

I haven't tested this out yet, but I am pretty sure it will work.
see http://www.postgresql.org/idocs/index.php?functions-formatting.html for more details on how the to_date function works.

Cheers