Re: Date question

Поиск
Список
Период
Сортировка
Искать
От
Frank Bax
Тема
Re: Date question
Дата
Msg-id
5.2.1.1.0.20030910095139.00a11c60@pop6.sympatico.ca
Список
Дерево обсуждения
Date question "Grant Henderson" <granth@fusion-advertising.co.uk>
Re: Date question Robby Russell <rrussell@commandprompt.com>
Re: Date question "scott.marlowe" <scott.marlowe@ihs.com>
At 05:46 AM 9/10/03, Grant Henderson wrote:

>How do I convert a postrgesql timestamp
>To an english date
>
>E.g.
>         $order_date = "2003-09-10 09:40:30+01";
>         $date = date("d/M/Y", $order_date);
>         print($date);


The input to php "date" function is a unix timestamp, not a string.
Use:
         select date_part('epoch',order_date) from ...
instead of
         select order_date from ...





>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

В списке pgsql-php по дате отправления
От: Grant Henderson
Дата:
Сообщение: Date question
От: scott.marlowe
Дата:
Сообщение: Re: Date question
FAQ