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.


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



Reply via email to