5 Replies Latest reply on Mar 28, 2017 11:37 PM by 3224fbdab25f2ce667d8e92d9bf1fac7a845fb55

    Formatting / Subtracting Date - Velocity stopped working

      I have a Velocity script where I use DateTool and ComparisonDateTool to find the difference between today and the day a lead started a trial.  It worked magically one day.  And the next day it didn't.  The value holding the start day of the trial would no longer convert into the proper Date Object thus the ComparisonDate difference() would not work. 


      There were no changes to the field or our Marketo that I was aware of.  Anyone have any thoughts?  Snippet below


      #set ($today = $date.getDate())
      #set ($start = $date.format(${OpportunityList.get(0).StartDate__c}))
      #set ($diff = $date.difference($start, $today).days)
      z${today} | ${start} | ${diff}