Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
QVUser1
Partner - Contributor III
Partner - Contributor III

Calcuating Business Hours

Hi,

From Below Screen Shot we can Find( billing Date ,Vessel Date,Billing time,Vessel Time,Month) . from these fields need to calculate the following

  • Working Hours : 09:00:00 AM to 05:00:00 PM
  • Working Hours :09:00:00 AM to 05:00:00 PM Excluding [Sat, Sun]

Community_Capture.JPG

Output:

output_Community.JPG

for Example 2 Row:

Billing Date Time  08-09-2017 09:00:04 AM and Vessel Date time 11-09-2017 11:00:03 AM

Working Hours required to fill the vessel is 10 hours because as we have remove dates of  09 sep and 10 Sep 2017 as they are weekends and non working hours.

Regards,

Bharath.B

7 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this links hope it helps you.

Business Working Hours Calculation

Business hours function

QVUser1
Partner - Contributor III
Partner - Contributor III
Author

Hi Jagan,

thanks for the reply.

But can u please explain the same with above example

jagan
Luminary Alumni
Luminary Alumni

Hi Bharat,

Go through those links it has very clear cut examples with good description.

Regards,

Jagan.

QVUser1
Partner - Contributor III
Partner - Contributor III
Author

HI Jagan,

This Code is Working perfectly only for Working hours from 9 and 18 hours.

can u plz suggest me values  to define values for morning 9.00 AM and Evening 17.30 PM

Because if i define variable values with 09 and 17.30 its not Working.

Can u please Help me out

QVUser1
Partner - Contributor III
Partner - Contributor III
Author

Hi Jagan,

I clearly Agree with your point. but here iam asking about morning 9.30 and evening 17.30

this coding is not working for Let vstarthour=9.30

                                               let Vendhour=17.30

QVUser1
Partner - Contributor III
Partner - Contributor III
Author

Hi Jagan,

I clearly Agree with your point. but here iam asking about morning 9.30 and evening 17.30

this coding is not working for Let vstarthour=9.30

                                               let Vendhour=17.30