| От | Ben |
|---|---|
| Тема | Re: Trouble with UNIX TimeStamps |
| Дата | |
| Msg-id | 1041013949.13070.328.camel@purple обсуждение исходный текст |
| Ответ на | Trouble with UNIX TimeStamps ("Jonathan Chum" <jchum@aismedia.com>) |
| Список | pgsql-general |
On Fri, 2002-12-27 at 05:49, Jonathan Chum wrote: > The table column, ticket_starters.ticket_time_start is an INT type which > contains a UNIX timestamp. I did not see anywhere in the Interactive docs > how'd I convert the UNIX timestamp into a timestamp type so I can extract > the day name. I'd rather not use PostGreSQL's timestamp types and just > convert the database over to it since much of the programming utilizes the > UNIX timestamp. Any ideas? select 1041013653::int4::abstime; will give you the timestamp from unixtime. If you just want the day, you can use to_char like so: select to_char(1041013653::int4::abstime,'dd');
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера