7webcreator
Member
Hello,
I have two calc element with this syntax:
Everything is displaying as it should be but as soon as I want to save the form I get this error message below
DateTime::__construct(): Failed to parse time string (2016-09-14 00:00:00,00:00:00) at position 20 (0): Double time specification
Can my syntax be improve please, any idea why I get this error?
Thanks in advance.
I have two calc element with this syntax:
Code:
$start = '{orders___OpDate_raw}';
if (!empty($start)) {
$end = new DateTime($start);
return $end->modify("-30 days")->format("d/m/Y");
}
else {
return "";
}
DateTime::__construct(): Failed to parse time string (2016-09-14 00:00:00,00:00:00) at position 20 (0): Double time specification
Can my syntax be improve please, any idea why I get this error?
Thanks in advance.