2 Replies Latest reply: Aug 12, 2016 2:21 PM by Salamon Musayev RSS

    IF THEN DATE <

    Salamon Musayev

      Hello,

       

      I need help with the if then else question and using with time.

       

      I need to create a new column in the load editor that looks whether  confirmation was done and if it was done within 4 hours (or 240 minutes) then create a column.


      Example:

      Column:                Confirm Status (string)            ElapsedTime (date)                        ConfirmWithin4hour

      Row:                     Confirmed                   200 ( in minutes)                                         Yes

                                  Confirmed                   10000 (in minutes)                                       No

       

      My code is as follows 

       

      Load *

        IF     ("Confirm Status" = 'Confirmed' AND "ElapsedTime" < 280 )   , 'Yes', 'No') AS ConfirmWithin4hour

       

      The code loads however when I check against elapsed time in the app, it does show the correct numbers, as it grays out even numbers below 240 and show number above 240 as well.

       

      I believe I am not using the < sign correctly when it comes to the date.

       

      Please help, or if you have other work around please let me know.  Thank you