I have an excel file which has a time input.
Mar 01, 2018 | Thursday | 8:00 AM | 5:00 PM Mar 02, 2018 | Friday | 8:00 AM | 5:00 PM
B
Thankfully I have found the answer just now.
$in = \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($time_in); echo gmdate("g:i a", $in);
Hopefully, this could be useful for others.