Re: Date/Time Formatting
| From: | Jeff Lacy | Date: | Sat, 20 Jan 2001 08:18:20 +0000 |
| Subject: | Re: Date/Time Formatting | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35784@lists.php.net to get a copy of this message | ||
When you are doing you select try something more along the lines of:
select date_format(date, '%e,%c,%Y') from tblmycoolstuff;
I got most of this stuff from
http://www.mysql.com/doc/D/a/Date_and_time_functions.html
You need to look
at the table on that page to get the date to print out exactly as you want
it. I know date_format works with the timestamp column type, but I don't
know (but I assume) that it works the same exact way for some of the other
types that store dates :-)
If you still are having trouble, maybe I could help you?
Jeff
""Richard Lynch"" <richard@zend.com> wrote in message
news:01e801c08244$85dfd640$64aa8ed8@142.170.100...
> > Also I'd like to if possible to be able to enter and display the date in
> > Australian / European Time format (DD,MM,YYYY)
> > I'm currently entering it on the form using three text fields and then
> > rearanging them to the Format in mySQL and indserting it as a string,
but
> I
> > don't know how to 'break' up a mySQL Date value to rearange it.
>
> The breaking up of a MySQL date would be in the MySQL manual at
> http://mysql.org
> I dunno what it's called... In PostgreSQL it's "date_part" though :-)
>
> I'm afraid there was another question in there somewhere, but I couldn't
> really discern it -- What you are doing seems quite reasonable to me.
>
>
>
> --
> 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
>