Time Calculations

ChandlerscottChandlerscott Member Posts: 8
I have a job Scheduler that I can look at and see that 'X' and ends at 'Y'. what I am looking to do is to get the total run time 'Y-X'. Anyway to do this?

Comments

  • AlbertvhAlbertvh Member Posts: 516
    You could do it like this
    Duration := Y - X;
    

    Where Duration is Data Type Duration


    Albert
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    If X & Y are fields of type TIME, you can look at this thread CalcTime function ? . The last message gives you the functions TimeToDecimal and DecimalToTime:
    decTimeX := TimeToDecimal(X);
    decTimeY := TimeToDecimal(Y);
    MESSAGE('Elapsed Time: %1',DecimalToTime(decTimeY - decTimeX));
    
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • ChandlerscottChandlerscott Member Posts: 8
    Thank you ...This solved my Problem. I knew it had to be something simple ](*,)
    :D:D:D:D
Sign In or Register to comment.