I'm grabbing some information from a database and the record is in an MSSQL DateTime format, when I return it, it shows in my array as follows:
[arrayItem] => DateTime Object
(
[date] => 2008-06-05 09:14:11
[timezone_type] => 3
[timezone] => Europe/London
)
When I try to extract this as an array (ie $array[arrayItem][date]) I get an error:
Fatal error: Cannot use object of type DateTime as array
I have also tried formatting the data in SQL before it is passed to the PHP, and the strtotime functions and had no joy.
Any recommendations would be very welcome, I'm tearing my hair out with this one!
Thanks