Re: PHP modifying data from DB?

From: Date: Mon, 26 Apr 2004 13:43:07 +0000
Subject: Re: PHP modifying data from DB?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-184635@lists.php.net to get a copy of this message
Chris Shiflett wrote:
--- Gabe <ydnahg-news4432@mailblocks.com> wrote:
Here's what I tried and it seems to be working now. Thanks Richard! $var = date("m-d-Y", strtotime($dbDate)); $var then has the value of the date only. Still curious as to why those extra zero's are tacked on.
It's because MySQL is storing the date accurate to the second. Are you assuming the time is not stored, because you do a select at the MySQL prompt and don't see it? If so, that's the misunderstanding. Hope that helps. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly
     Coming Fall 2004
HTTP Developer's Handbook - Sams
     http://httphandbook.org/
PHP Community Site
     http://phpcommunity.org/
Actually the date is being stored in an Access DB. The format for the field in the database is mm/dd/yyyy and yet I still get those extra zero's. Weird....

« previous php.general (#184635) next »