Re: PHP modifying data from DB?
| From: | Gabe | Date: | Fri, 23 Apr 2004 18:48:31 +0000 |
| Subject: | Re: PHP modifying data from DB? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184454@lists.php.net to get a copy of this message | ||
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. Dare I mention it on this newsgroup, but when I used ASP I only got the date without the extra zero's.
Richard Davey wrote:
Hello Gabe, Friday, April 23, 2004, 7:33:53 PM, you wrote: G> Let's say that getting those zero's is ok. Is this the code that I G> would write to form the proper date I want? G> $dbDate = value from the date field in the database G> date("m-d-Y", $dbDate); Yeah that should be fine - you could do: date("m-d-Y 00:00:00", $dbDate); But I'm sure Access will add on the extra zeros if you do not specify them - would be worth testing to make sure though.