Re: Re: convert yyyy/mm/dd to mm/dd/yyyy, how?
| From: | DL Neil | Date: | Sun, 13 Jan 2002 20:23:39 +0000 |
| Subject: | Re: Re: convert yyyy/mm/dd to mm/dd/yyyy, how? | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-general+get-80375@lists.php.net to get a copy of this message | ||
Rasmus,
I have held several datetime-related conversations with people recently, and another series about
'when'/whether
to use PHP or MySQL functionality.
Here you are, "the man" of PHP, advising Sander to use MySQL functionality! (and in marked
contrast to the
(biased) advice one might expect on PHP lists, eg JDEW's reply) I'm grinning at the
apparent incongruity, but
with no insult to yourself.
Would you care to comment further on when one should consider using SQL commands in favor of
implementing
identical functionality in PHP (and possibly in some situations, vice-versa)?
Regards,
=dn
----- Original Message -----
From: "Rasmus Lerdorf" <rasmus@lerdorf.ca>
To: "Sander Peters" <S.Peters@Visionnet.nl>
Cc: <php-general@lists.php.net>; <php-db@lists.php.net>
Sent: 13 January 2002 19:52
Subject: [PHP-DB] Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?
> MySQL has plenty of functions to return dates to you in any format you
> specify. Please read
>
> http://mysql.com/documentation/mysql/bychapter/manual_Reference.html#Date_and_time_functions
> and pay special attention to the DATE_FORMAT() function.
>
> -Rasmus
>
>
>
> On Sun, 13 Jan 2002, Sander Peters wrote:
>
> > Hello everybody,
> >
> > convert yyyy/mm/dd to mm/dd/yyyy, how?
> >
> > MYSQL does everything in yyyy/mm/dd.
> > I live in the Netherlands and we are use to the format dd/mm/yyyy.
> >
> > What's the best way to display it as mm/dd/yyyy in a table on a query?
> >
> > My first idea whas to split the date up in vars in php and then print
> > the vars in the way I like it
> > Is this a bad idea? Or are there better sollutions?
> >
> > Thanx in advance for answering!
> >
> >
> >
> > --
> > Met vriendelijke groet / With Greetings,
> >
> > Sander Peters
> >
> > site: http://www.visionnet.nl/
> > email: mailto:s.peters@visionnet.nl
> > webmail: mailto:sanderpeters@yahoo.com
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>