2 Replies Latest reply on Oct 6, 2011 12:36 PM by Atmosfera

    Some help with NOW_DT

    Atmosfera

      Hi there!

       

      I have a question, in a form I have two fields, one is currentDate and aother one is dueDate, the idea on currentDate is to pull the current date, for this I'm using NOW_DT, that value is defined here:

       

      $ins_Polizas->addColumn("currentDate", "STRING_TYPE", "VALUE", "{NOW_DT}");

       

      On dueDate I want to have the exact date on a year ahead so if my currentDate prints 10/04/2011 the dueDate should print 10/04/2012 the thing is, I don't know what value to use here so my definitions looks empty right now:

       

      $ins_Polizas->addColumn("dueDate", "STRING_TYPE", "VALUE", "");

       

      I know how to achieve this using simple PHP and 2 fields, something like:

       

      <?php $dueDate = date("d-m-Y H:i:A",strtotime(".$dueDate + 366 days")); ?>

       

      and then calling the variable like:

       

      <?php echo ($dueDate) ?>

       

      That should do the trick, but I want to use the NOW_DT thing but still not sure how to automatically calculate the dueDate, so, any idea or walkaround about this?

       

      Thanks so much!

       

      A