Possible Duplicate:
Convert date format yyyy-mm-dd => dd-mm-yyyy
I am extracting data from MySQL and passing it to a PHP page, part of which is a Javascript timeline graph.
I am using json_encode to convert the query result into a format that the Javascript timeline requires.
However json_encode outputs the following:
{"start":"2012-06-06 18:05:21", "content":"Start Date", }
Whereas the format the timeline needs is
{"start": new Date(2010,7,23,23,0,0), 'content': "Start Date", }
Can I convert the output to the required format either before, or as part of the json_encode process?