Focal Point
Working hours

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4511067191

October 19, 2006, 04:19 AM
Adolf Mergulhao
Working 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.


Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
October 19, 2006, 04:27 AM
Adolf Mergulhao
Is there a function for working hours


Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
October 26, 2006, 01:10 PM
Kerry
Hi 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 Functions

Hope these help. Big Grin

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.