Question: how to calculate difference between two dates in cobol?
Answer: COMPUTE TEMP-1 = FUNCTION INTEGER-OF-DATE(WS-INT-DATE1). COMPUTE TEMP-2 = FUNCTION INTEGER-OF-DATE(WS-INT-DATE2). COMPUT WS-NEW-DATE = TEMP1 - TEMP2. COMPUTE WS-HOURS = WS-NEW-DATE * 24.