Re: Re: Date Question [SOLVED]
| From: | Tom Chubb | Date: | Fri, 17 Mar 2006 13:27:34 +0000 |
| Subject: | Re: Re: Date Question [SOLVED] | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-232114@lists.php.net to get a copy of this message | ||
Thanks guys.
On 17/03/06, João Cândido de Souza Neto <joao@consultorweb.cnt.br> wrote:
>
> select date_format(date,"%d/%m/%y") as date from table
>
> It'll show in 17/03/06 format
>
> select date_format(date,"%d/%m/%Y") as date from table
>
> It'll show in 17/03/2006 format
>
>
> Tom Chubb wrote:
>
> > Please can you help me. I've created a page where problems are posted
> into
> > a database and I am using the datetime format in MySQL and trying to
> find
> > the best way to display it in the 17/03/06 format.
> > I've found a way of doing it (so you don't think I haven't googled,
> RTFM)
> > but don't think it's the best way.
> > Any help would be appreciated.
> >
> > (Current Code:)
> >
> > <?php
> > $datestr = $row_rsSnags['date'];
> > $arr1 = str_split($datestr, 2);
> > echo $arr1 [2];
> > echo "/";
> > echo $arr1 [1];
> > echo "/";
> > echo $arr1 [0];
> > // echo $row_rsSnags['date'];
> > ?>
>
> --
> ---------------------------------------------------
> João Cândido de Souza Neto
> Web Developer
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Tom Chubb
tom@ps-promo.co.uk
07915 053312