title: How to convert datetime in string format into proper date & time format in PHP CodeIgniter?
body: <p>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.</p>
  
  <p>I got following response:</p>
  
  <pre><code>"start_time": 1492841592,
  "end_time": 1492841619,
  "seconds": 22392,
  "duration": "00:00:27",
  "_drm": 0.45,
  </code></pre>
  
  <p>And I want output in :</p>
  
  <pre><code>01:10pm 16 Mar
  </code></pre>
  
  <p>This format.</p>
  
  <p>To convert it I'm trying to use <code>date()</code> function from <strong>PHP</strong>. But it wont give me proper result.
  I'm referred following question:</p>
  
  <p><a href="https://stackoverflow.com/questions/32605570/how-to-convert-string-to-date-format-in-php">How to convert string to date format in PHP?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/38349438/how-to-convert-string-day-into-date-time-format-in-php">how to convert string day into date time format in php</a></p>
  
  <p><a href="https://stackoverflow.com/questions/35126149/how-to-convert-string-time-to-datetime-format-in-php">how to convert String time to dateTime format in php?</a></p>