ontarget
Active Member
Any ideas why
Shows the date from my calc field correctly as :
string(10) "30/09/2021"
But when i redeclare the $date in order to do a date comparison....
I get
string(10) "1970-01-01"
I can only think there is a deprecation since moving to php7.4 / Fabrik 3.10? as my code works in a older php7.3 system but I can seem to find any evidence of this....
PHP:
$date = $row->course_registrants___teacher_coursedates;
var_dump($date);
exit;
string(10) "30/09/2021"
But when i redeclare the $date in order to do a date comparison....
PHP:
$date = $row->course_registrants___teacher_coursedates;
//var_dump($date);
$date = date('Y-m-d', strtotime($date));
var_dump($date);
exit;
$month_3 = date('Y-m-d', strtotime('3 months ago'));
if (stuff here){ etc
string(10) "1970-01-01"
I can only think there is a deprecation since moving to php7.4 / Fabrik 3.10? as my code works in a older php7.3 system but I can seem to find any evidence of this....