October 19, 2006, 04:19 AM
Adolf MergulhaoWorking hours
Therefore between 4pm on Friday to 9am on Monday is 2 working hours, using your formula as it's less than 1 day it would return "0" days
DEFINE FILE GIGICCTREC
DIFF/I6 = DATEDIF(ORD_ISSUE_DT, CUSTOMER_HO_DATE, 'WD');
END
TABLE FILE GIGICCTREC
PRINT
CR_CDESG
ORD_ISSUE_DT
CUSTOMER_HO_DATE
DIFF
WHERE CR_CDESG EQ 'CB-IRVN NP1'
END
With the weekday DATEDIF does not count Saturday or Sunday when calculating days. This means that the difference between Friday and Monday is one day.
October 19, 2006, 04:27 AM
Adolf MergulhaoIs there a function for working hours
October 26, 2006, 01:10 PM
KerryHi Adolf,
Has this issue been resolved on your side?
I ran a quick search on Information Builders' online documents regarding "date" and "hours" and came across the following topics which may be of interest:
Calculating Business Hours and Days Accurately (Not Including Weekends)How to extract the time from a datetime field How to calculate business hours between DATETIME stamps? Introduction to Date-Time FunctionsHope these help.
Cheers,
Kerry