Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (15/JAN/20) at position 0 (1):
......第26行
$first_installment_date = new datetime($aData[0]->FIRST_INSTALL_DATE);
php codeigniter工作正常之前...当我重新安装oracle n xampp..it显示错误
答案 0 :(得分:4)
15/JAN/20)
不是DateTime()
的{{3}}。您需要使用valid format来解析该日期:
//Assuming YY/Mon/DD
$first_installment_date = DateTime::createFromFormat('y/M/d', $aData[0]->FIRST_INSTALL_DATE);
答案 1 :(得分:-1)
public __construct ([ string $time = "now" [, DateTimeZone $timezone = NULL ]] )
您确定“ $ aData [0] - > FIRST_INSTALL_DATE ”不为空?