On my return response i am getting start_time
like 10:00:00
in 24 hours format.I want to convert it in to two variables on var a ="10:00"
and on var b = "PM"
i tried it several times but not succeed. How can i do this.
Code on my php function :
$time = $actData->start_time; // 14:00:00
$startTime = date('h:i', strtotime($time)); // 02:00
$amPm = date('a', strtotime($time)); // PM
Same i want to do with scripts . How can i do this?