I got a JSON response of date and time in string format, and I want it to convert into proper date and time. I'm using a API to get a response and that comes in JSON code, but while it is in string form. How can I convert it into Proper Date and Time.
I got following response:
"start_time": 1492841592,
"end_time": 1492841619,
"seconds": 22392,
"duration": "00:00:27",
"_drm": 0.45,
And I want output in :
01:10pm 16 Mar
This format.
To convert it I'm trying to use date()
function from PHP. But it wont give me proper result.
I'm referred following question:
How to convert string to date format in PHP?