Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method PTF_GetTotalDuration ( 
 | 
  String startdatetimestring, 
 | 
  String enddatetimestring 
 | 
) as String id:Method_LibPTF_pnlTestController_PTF_GetTotalDuration 
 | 
{ 
 | 
  #keys: '[103546.0.77946659]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Calculate the duration from the start and end time supplied 
 | 
    result := Duration::Zero(); 
 | 
     
 | 
    if( startdatetimestring <> "" and startdatetimestring <> "N/A" 
 | 
        and enddatetimestring <> "" and enddatetimestring <> "N/A" 
 | 
      ) 
 | 
    { 
 | 
      startdatetime := LibPTF_pnlTestController.PTF_ConvertStringToDateTime( startdatetimestring ); 
 | 
      enddatetime   := LibPTF_pnlTestController.PTF_ConvertStringToDateTime( enddatetimestring ); 
 | 
     
 | 
      result := enddatetime - startdatetime 
 | 
    } 
 | 
     
 | 
    return [String]result; 
 | 
  *] 
 | 
} 
 |