從我從.net
API查詢得到的JSON片段中,我似乎無法在PHP中正確轉換日期/Date(1393477200000)/
。如何將此日期格式轉換爲PHP
我試圖做echo date('m/n/Y','1393477200000');
,但它仍在輸出錯誤的日期,即07/7/46127
而不是正確的日期2/27/2014
。
Array
(
[status] => ok
[results] => Array
(
[0] => Array
(
[PROJECT_ID] => 1
[COMPANY_ID] => 1
[PROJECT_NAME] => The "Getting Started" Project
[PROJECT_NUMBER] => 000001
[CAN_OPEN_PROJECT] => 1
[DATE_START_DATE] => /Date(1393477200000)/
[DATE_END_DATE] => /Date(1440648000000)/
[PROJECT_DESC] =>
[TASK_NUMBER] => 6
[DATE_CREATED] => /Date(1409142925980)/
[TOTAL_TASKS] => 1
[TOTAL_INCOMPLETE_TASKS] => 1
[TOTAL_COMPLETED_TASKS] => 0
任何想法如何在PHP中正確格式化[DATE_START_DATE]
?謝謝!
謝謝!有效! – nancylee973 2014-08-27 09:41:33
很高興我能夠幫助。標記爲已回答,因此可以關閉。 – C4u 2014-08-27 09:49:45