Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将 dateLocal 变量获取为“2013-04-18T12:25:00.000” 我如何才能在其中仅检索12:25:00.000?
我在下面的代码中调用这个值
echo $flightstatus->arrivalDate->dateLocal,"<br>";
您可以使用date和strtotime函数来实现这一点
date
strtotime
echo date('H:i:s',strtotime($flightstatus->arrivalDate->dateLocal));
这将输出
12:25:00