Re: format date
| From: | Andrey Hristov | Date: | Tue, 23 Oct 2001 14:56:36 +0000 |
| Subject: | Re: format date | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71914@lists.php.net to get a copy of this message | ||
I don't know if this will help but there's from_unixtime() function in mysql.
use ....values($some,$another,from_unixtime(".
time()."),......"
On Tuesday 23 October 2001 03:52 am, you wrote:
> Thanks,
>
> I am inserting into table
> values('$product','$title,'$date')
>
> the date field gets added by default, like time stamp,
>
> when i view the contents added to database i see date field showing
> ex:
>
> display.php
>
> $product, $title, $date
> ................................................
> mango good fruit Jan 1 1900 12:00:00:000AM
> .................................................
>
> I would like the date to show 23-10-01 instead of
> Jan 1 1900 12:00:00:000AM that gets inserted as a default
>
> any help
>
> Caleb Carvalho
> Application Engineer
> LoadRunner/APM
> ---------------------------------------------------------------------------
>-------------- Enterprise Testing and Performance Management Solutions
> ---------------------------------------------------------------------------
>-------------- Mercury Interactive
> 410 Frimley Business Park
> Frimley, Surrey. GU16 7ST
> United Kingdom
> Telephone : +44 (0)1276 808300
>
>
>
> From: David Robley <huntsman@www.nisu.flinders.edu.au>
>
> >Reply-To: huntsman@www.nisu.flinders.edu.au
> >To: "Caleb Carvalho" <havanero@hotmail.com>, php-general@lists.php.net
> >Subject: Re: [PHP] format date
> >Date: Tue, 23 Oct 2001 10:02:26 +0930
> >
> >On Mon, 22 Oct 2001 22:38, Caleb Carvalho wrote:
> > > Hi all,
> > >
> > > i would like a simple way to get date field formatted from my little
> > > sybase,
> > >
> > > for some reason the output of it is showing the wrong date
> > > example "Jan 1 1900 12:00:00:000AM"
> > >
> > > thanks
> >
> >Perhaps if you could show what you are doing and which is not working,
> >someone might be able to help you. As it is we have no idea of the format
> >of your data or the method you are using.
> >
> >--
> >David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
> >CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
> >
> > Politics is the entertainment branch of industry.
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp