Re: date, and time?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



you could change mysql to a few different date formats, but i don't _think_
that is one of them.

Why not just take care of a format change on the way out with DATE_FORMAT.
Also, if you store the date as one of the defualt date[time] values then
you have tons of functions that you can run against your data...

http://www.mysql.com/doc/en/Date_and_time_types.html
http://www.mysql.com/doc/en/Date_and_time_functions.html

hth
jeff


                                                                                                                                           
                      Tristan.Pretty@risk.                                                                                                 
                      sungard.com                 To:       php-db@lists.php.net                                                           
                                                  cc:                                                                                      
                      07/10/2003 11:02 AM         Subject:   date, and time?                                                       
                                                                                                                                           
                                                                                                                                           




Cheers for the help on my last auto inc prob..
I checked out phpmyadmin, and I'm loving it...! cheers all....

Anyway,
I want to know how to store a date like this in a MySQL database:

        date("F j, Y, g:i a");

Resulting in:

        July 10, 2003, 3:39 am

But what do I need to set my database table to, to capture the full data.
I can use text, but then I can't sort by date later on....

Ideas?

Cheers list...

*********************************************************************
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***********************************************************************







-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux