3 Replies Latest reply on Jun 16, 2016 5:34 PM by 5d96dcb42eff14c69388c3ddbf7e6636cff71ef9

    How can I use greater than and less than operator with date values?

      I want to render dynamic content for leads with the anniversary date between 7-1-16 and 10-30-16 and I've scripted the following but it's not working? Any ideas on how I can make this work? Can I use a date values stored in custom object to drive content logic using if and else statement?

       

      #foreach($partner in $partner_cList)
      #set ($AnniversaryDate = $date.toDate("yyyy-MM-dd", ${partner.AnniversaryDate}))

      #set ($Date1 = "2016-7-1")
      #set ($Date2 = "2016-10-30")


      #if($Date1 <= $AnniversaryDate && $Date2 >= $AnniversaryDate)
      #set($matchedpartner = ${partner.partnerID})

       


      #else
      #end
      #end