Re: Re: Re: [PHP-WIN] transforming date format
| From: | afan | Date: | Mon, 18 Dec 2000 22:44:26 +0000 |
| Subject: | Re: Re: Re: [PHP-WIN] transforming date format | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4529@lists.php.net to get a copy of this message | ||
I tried with split() and it works.
But, now I have to transform all dates in old format (varchar) to new format
(date).
When I tried just UPDATE content with old content I got weird dates in
table. How can I dates in varchar format put in column with date format?
Thanks!
----- Original Message -----
From: <Gregory_Griffiths@cargill.com>
To: <afan@sprout.net>
Cc: <php-windows@lists.php.net>
Sent: Monday, December 18, 2000 9:34 AM
Subject: RE: Re: Re: [PHP-WIN] transforming date format
> try :
>
> DATE_FORMAT(date,format)
>
> it is in the MySQL reference.
>
> > -----Original Message-----
> > From: afan@sprout.net [mailto:afan@sprout.net]
> > Sent: 18 December 2000 20:19
> > To: griffiths, gregory d. /here
> > Subject: Re: Re: [PHP-WIN] transforming date format
> >
> >
> > I think that there is a solution with transforming
> > One-Format-Date into
> > timestamp and than transforming that timestamp into Other-Format-Date?
> > I tried with mktime() and date() but probably I'm doing
> > something wrong!
> >
> >
> >
> >
> > ----- Original Message -----
> > From: <Gregory_Griffiths@cargill.com>
> > To: <afan@sprout.net>
> > Sent: Monday, December 18, 2000 9:02 AM
> > Subject: RE: Re: [PHP-WIN] transforming date format
> >
> >
> > > when you creat your SQL Statement you'll have something like :
> > >
> > > SELECT myname,myaddress,mydate FROM mytable WHERE myage<50
> > >
> > > You would change it to :
> > >
> > > SELECT myname,myaddress,to_char('mydate','dd/mm/yyyy') FROM
> > > mytable
> > > WHERE myage<50
> > >
> > > You may need to check the documentation for MySQL to be
> > sure about the
> > > syntax.
> > >
> > > > -----Original Message-----
> > > > From: afan@sprout.net [mailto:afan@sprout.net]
> > > > Sent: 18 December 2000 19:56
> > > > To: griffiths, gregory d. /here
> > > > Subject: Re: [PHP-WIN] transforming date format
> > > >
> > > >
> > > > I tried to split but it doesn't work.
> > > >
> > > > Could you please explain
> > > > to_char('mydate','dd/mm/yyyy')
> > > > a little bit more? Thanks.
> > > >
> > > > Afan
> > > >
> > > > ----- Original Message -----
> > > > From: <Gregory_Griffiths@cargill.com>
> > > > To: <afan@sprout.net>
> > > > Sent: Monday, December 18, 2000 8:52 AM
> > > > Subject: RE: [PHP-WIN] transforming date format
> > > >
> > > >
> > > > > pull it out in your SQL
> > > > >
> > > > > to_char('mydate','dd/mm/yyyy')
> > > > >
> > > > > or you could use some substring routines to split it then
> > > > put it back
> > > > > together.
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: afan@sprout.net [mailto:afan@sprout.net]
> > > > > > Sent: 18 December 2000 19:48
> > > > > > To: php-windows@lists.php.net
> > > > > > Subject: FW: [PHP-WIN] transforming date format
> > > > > >
> > > > > >
> > > > > > Hi to all,
> > > > > >
> > > > > > Date format in MySQL (date format) is (e.g.) 2000/12/03, but
> > > > > > I have to show it as 12/03/2000. How change the format?
> > > > > >
> > > > > > Afan
> > > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>