I am trying to write an if statement with 2 conditions.... one of them being if it has been longer than 60 minutes and the other condition is that it is "late". Example, I am trying to determine when shipments are late over an hour but I don't want it to count when shipments are early, just when they are late. Here is the equation I had originally buts its counting when shipments are greater than 60 minutes early as well:
IF HDIFF ( SHIPMENT_INDIVIDUAL_MOVE_COSTING.LOAD_DATE_FIELDS.SL_LD_DROP_ACTUAL_DATE , SHIPMENT_INDIVIDUAL_MOVE_COSTING.LOAD_DATE_FIELDS.SL_LD_DROP_APPT_START_DATE , 'Minute' , 'D6' ) GT 60 THEN 1 ELSE 0
Any assistance or thoughts are appreciated.... I feel stuck
I've tried some code with your problem, and I think it's working as intended.
The code I've used:
The result is:
This is fictitious data, but you can see I've created a file with several fields, one with product code, other with the time the product has to be delivered in Timestamp format, and lastly, other with a field that represents the "moment" of the report. With these 2 Timestamp we can use the function HDIFF to find the difference in minutes from both moments, as Double. With this conversion, we can check if it's less than 60 min (LT) or greater or equal than 60 (GE).
Regards.