John Taylor-Johnston wrote:
How do I parse a date field from mysql?

I was hoping this would work:

$mydata->birthday = "2007-02-13";
This just stores a string to the variable $mydata->birthday - where did you define $mydata->birthday as a data object?
$mydata->birthday = date("2007-02-13");

#What month is it?
echo date("F", $mydata->birthday);
#What year is it?
echo date("Y", $mydata->birthday);

What am I missing? All I get is December 1969. Hmmm?

I am looking at the manual:

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Firebird -

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to