Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add workday to datetime

Hello,

I'm searching for a function or solution to add a variabel amount of workdays to another variabele datetime. I see functions as FirstWorkDay, Lastworkday and netWorkDay but neither of them is the solution for me.

For example: 06/28/2011 + 5(days) =  07/05/2011. How can i do this in Qlikview?

Thanks!

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

If you want to add 'N' work days, will the function LastWorkDate(startdate,N+1) work for you?

View solution in original post

5 Replies
Anonymous
Not applicable
Author

If your date is recognized as a proper date (i.e. it has an underlying numeric value) in your document it's as easy as: Date(DATEFIELD +5) as DATEFIELDPlus5

Not applicable
Author

Hello Johannes,

Thanks for your quick reply.

I want to add a number of workdays not just days. I mentioned this in the title and in de example but forgot to mention "work" in the body i changed it.

Anonymous
Not applicable
Author

Ah, sorry about that Michel. Was reading too quickly and missed that part. Hm, that's trickier. Basically you're trying to figure out how many days to add to get a NetWorkDays() addition of 5 days. I'll see if I can come up with anything

nagaiank
Specialist III
Specialist III

If you want to add 'N' work days, will the function LastWorkDate(startdate,N+1) work for you?

Not applicable
Author

This is exactly what i needed. It just generate a date based on adding N workdays. I looked for this kind of function but couldn't find it. Now i have! Thanks!