Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Having problems with displaying date
February 23, 2005, 9:09 am
rate this thread
I'm having problems displaying a date in the correct format and I was
wondering if anyone knew how to help.
I'm using pear to extract a date from our back end database (the date
is in DATE_FORMAT_ISO_EXTENDED), and I was to display the date in
"Wednesday, February 23rd 2005, 11:04" format.
I'm using something like:
$x = new Date();
$x->setDate( $DateTime_text); // $DateTime_text is from pear
$x->format( D ); // This doesn't work!
I've tried $x->format( %D ); but this gives a Parse error, saying that
it found "an unexpected '%', expecting ')'".
I've tried introducing quotation marks into the format function, even
escaping them, but nothing works. Can anyone help please?