Guilherme Silva <guilherme(dot)silva(at)nexxera(dot)com> writes:
> Negative, i know what the to_date do.
I don't think you do, because you are feeding it input that it will
ignore --- the hh/mm/ss fields are just being thrown away.
regression=# select to_date('01042005000000', 'ddmmyyyyHH24MISS');
to_date
------------
2005-04-01
(1 row)
regression=# select to_date('01042005235959', 'ddmmyyyyHH24MISS');
to_date
------------
2005-04-01
(1 row)
regards, tom lane