Re: Date question - Mailing list pgsql-php

From Frank Bax
Subject Re: Date question
Date
Msg-id 5.2.1.1.0.20030910095139.00a11c60@pop6.sympatico.ca
Whole thread Raw
In response to Date question  ("Grant Henderson" <granth@fusion-advertising.co.uk>)
List pgsql-php
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 by date:

Previous
From: "Grant Henderson"
Date:
Subject: Date question
Next
From: "scott.marlowe"
Date:
Subject: Re: Date question