RE: [PHP] Date problem
| From: | John W. Holmes | Date: | Mon, 02 Dec 2002 23:44:42 +0000 |
| Subject: | RE: [PHP] Date problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126772@lists.php.net to get a copy of this message | ||
> Thanks for this,
> I understand how to update in date in database, but I need when I get
date
> from database to increase or decrease before to save in database.
>
> Can you help me for this ?
Yeah, I already did:
> > You can select out the date you have now, use strtotime() to make it
> > into a unix timestamp (which PHP works with), and date() to format
it
> > however you want. If the user approves the new date, you can
reformat
> > the unix timestamp back to a YYYY-MM-DD format with date() or use
> > FROM_UNIXTIME() in your query to insert/update the new date into the
> > database...
---John Holmes...