I'm building internal erp based on joomla. main component for forms, database etc is Fabrik. At moment it's works great but I stuck on one field what I have problem to make working on way as I would like to. I have a form to edit previously entred data on another form. In this form one of field is Outstanding days. I use calc field type. Trouble is it's don't want to make required calculations. my php code for this field is:

$datetime1 = new DateTime(date("Y-m-d"));
$datetime2 = new DateTime(date_format({enquiries___due_date}, 'Y-m-d'));
return $interval;

closed as off-topic by Lodder Jun 13 '18 at 7:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (e.g syntax errors), or ask for free-work (e.g. re-factor sample or demo code), or overall require professional hands-on involvement are not in-scope of this site. Generally questions that ask for coding a solution must present some effort and that the user is in place to understand what the code is about. For more information, see help center" – Lodder
If this question can be reworded to fit the rules in the help center, please edit the question.


The error was simple stupid mistake. I missing a qoute on {enquiries___due_date} when I place this in quote everything start working.

Not the answer you're looking for? Browse other questions tagged or ask your own question.