11 Replies Latest reply on May 24, 2018 2:50 AM by Ritesh Bisht

    Calculate Datediff between one date column

    KRISHNAMOORTHY R

      I need to calculate datediff with one date column with structure as

        

      Time stampBattery voltageCondition
      01/04/2016 00:0051Yes
      01/04/2016 00:0152Yes
      01/04/2016 00:0245No
      01/04/2016 00:0348No
      01/04/2016 00:0449No
      01/04/2016 00:0555Yes
      01/04/2016 00:0654Yes
      01/04/2016 00:0752Yes
      01/04/2016 00:0851Yes
      01/04/2016 00:0949No
      01/04/2016 00:0948No
      01/04/2016 00:1147No
      01/04/2016 00:1245No
      01/04/2016 00:1250Yes
      01/04/2016 00:1351Yes

       

      I have a condition here, in third column which is as follows,

      If Battery voltage >50 , "No"

      If battery voltage >51, "Yes"

       

      So I need to calculate total number of mins a machine is running in battery.

       

      How to calculate datediff based on this.

       

      Any help will be really appreciated.

       

      Thanks