| От | Soeren Gerlach |
|---|---|
| Тема | Problem in converting int to timestamp value - why? |
| Дата | |
| Msg-id | 1095603472.1903.13.camel@hermes.all-about-shift.com обсуждение |
| Ответы |
Re: Problem in converting int to timestamp value - why?
|
| Список | pgsql-general |
Hello,
I've an integer column in a certain table that I need to convert into a
timestamp value to finally get a day difference to the current date.
From the manual it looks like straight forward, but the following line
is a great mistery for me:
SELECT to_timestamp(to_char(20041217, '9999 99 99'), 'YYYY MM DD')
results in a timestamp "2171-11-05 22:00:00" ??? The int-to-char
conversion works well ("2004 12 17") but the to_timestamp() doesn't work
as expected - why?
I'm running Postgresql 7.4
Thanks a lot,
Soeren Gerlach
-------------------------------------------------------------
Heute schon gelacht? http://all-about-shift.com/dailystrips/
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера