3 Replies Latest reply: Jun 22, 2015 3:39 PM by Stefan Wühl RSS

    subtract value from one row after according to hours

      Hi, I have a time variable displaying distinct hours and another variable displaying cost(so there is 1 cost value per hour). How can I calculate the difference such that for eg. the cost for 09:00 minus 08:00 and this applies to the rest of the hours? wanted output below.

       

      timecostdifference
      00:00:009283649-6300151
      01:00:002983498-948511
      02:00:00203498718163243
      03:00:002019823078177757
      04:00:0098375987-97552219
      05:00:008237682049700
      06:00:0028734685400180
      07:00:008273648964200
      08:00:009237848-973284
      09:00:008264564-907825
      10:00:007356739-4573091
      11:00:0027836481113920
      12:00:003897568

       

      Thanks.