3 Replies Latest reply: Mar 28, 2017 11:12 AM by Monica Labrador RSS

    If statement < date in load editor

    Monica Labrador



      I am having trouble with this if statement in the load editor.


      Here is an excerpt from my script:



      monthname("Original Order Date") as [original_order_date]

      FROM onesheet_churn




      monthname(if((original_order_date)<monthname('2011/4/18'), monthname(makedate(2011,4,18)), original_order_date)) as [churn_order_date]

      Resident _Onesheet_churn

      The result is that my dates prior to "2011/4/18" are not converted to "2011/4/18," the dates are showing up in their original form.


      What I need is "if(original_order_date)<(2011/4/18) then change the date to (2011/4/18) , else [original_order_date] as [churn_order_date]


      Any help is much appreciated!