Re: php mysql dates
| From: | zareef ahmed | Date: | Thu, 29 Jul 2004 03:32:16 +0000 |
| Subject: | Re: php mysql dates | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35492@lists.php.net to get a copy of this message | ||
Dear Irm Jr,
Here are two functions::
http::/www.php.net/strtotime
http::/www.php.net/mktime
using these functions togethor you can do the need
full.
BTW why not store just unix time stamp in mysql
database. Most People use a string field in mysql
database to store timestamp, it simply work without
any problem.
zareef ahmed
--- Irm Jr <irmjr@CART.ORG> wrote:
>
> Hi all, currently I have a form which prompts for
> the user to choose a
> date. The dropdown lists are stored into variables:
>
> $month //e.g. January, February, ...
> $day //e.g 1 - 31
> $year //e.g. 2004 (four digits)
>
> then combined into
>
> $articleDate
>
> How can I manipulate this variable to be in such a
> format that I can
> insert the information into a DATE column in a mySQL
> database.
>
> Dates are a bit of a mystery to me as PHP and MySQL
> handle them
> differently. Your help is appreciated.
>
> Thanks
>
=====
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail