PHP: Date format conversting string 2010-09-02T09:46:48.78 to dd/mm/yyyy

Atomic-AI

New Member
I am pulling a date string from an API. The returned string looks like this:\[code\]2010-09-02T09:46:48.78\[/code\]I want to convert it to 02/09/2010 (dd/mm/yyyy) but\[code\]date_format($note['createdate'], "d/m/Y")\[/code\]Results in error:\[code\]Warning: date_format() expects parameter 1 to be DateTime, string given in \[/code\]Can someone steer me in the right dirtection,ta,Jonesy
 
Back
Top