Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need to add minutes to a particular date only including the working hours...

Hi all,

       I need to write a code in qlikview to add some minutes to a particular date, while doing so I have to remove non-working hours,Weekends and Public holidays.

For Ex:

   IF I add some 1812 minutes to 22-07-2011 09:32:00 (Friday) , then 1812 minutes are to be added to this date.

The output should be on friday I will add 522 minutes (working hours from 8:30 to 18:15 i.e. 585 minutes).

Remaining minutes needed to be added 1290 (1812 - 522 = 1290).

Since its friday,I will skip next two days Saturday and Sunday.

I will start adding 1290 minutes from monday, On monday i will add 585 minutes.On tuesday I will add 585 minutes.

Remaining minutes will be 120, that I need to add on wednesday.

Then output timestamp would be 27-07-2011 10:30:00 (Wednesday).

Need some help on this.

Thanks in advance.

4 Replies
Not applicable
Author

Hi all,

Any reply on this...its kind a urgent requirement.

Thanks n Regards,

Amay

Not applicable
Author

Hi Amay,

Please, take a look into attached example.

Kind regards,

Janusz

Not applicable
Author

Hi Janusz,

Thanks for the reply.

I am able to add the minutes, but how do I remove the non-working hours,weekends and holidays,while adding the minutes?

Please suggest me.

Thanks n Regards,

Amay.

Not applicable
Author

Hi Amay,

I would like to ask you to define what exactly you are trying to achieve.

I can only guess that you are trying to create a work calendar.

Each day contains different work hours frame.

Please, post more details about the final goal.

Kind regards,

Janusz