Fatal error: Call to undefined function format() in /var/www/html/kiteconnect.php on line 602

mukeshkumarsharma
Hi Team,

Getting error with function getHistoricalData().

Original which is giving me error:
Line no 601: if ($from instanceof DateTime) {
Line no 602: $params["from"] = $from.format("Y-m-d H:i:s");
Line no 603: }

Getting error=> Fatal error: Call to undefined function format() in /var/www/html/kiteconnect.php on line 602

After modifying it to as following, it is working fine, please confirm if I am missing something or doing wrong.

Line no 601: if ($from instanceof DateTime) {
Line no 602: $params["from"] = $from->format("Y-m-d H:i:s");
Line no 603: }

Thanks & regards,
Mukesh Kumar Sharma
Sign In or Register to comment.