Qlik Community

Qlik Brasil

Group community for Brazil users. discussion only in Portuguese.

Highlighted
Not applicable

Operação com datas e dias úteis

Pessoal, boa tarde.

Estou com dificuldade em um cálculo.

Preciso adicionar dias uteis em uma data, por exemplo.

     20/10/2017 + 1 (sexta) deve retornar segunda

     20/10/2017 + 2 (sexta) deve retornar terça.


O que me sugerem?

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Operação com datas e dias úteis

try with

lastworkdate

from Qlik help

lastworkdate(start_date, no_of_workdays {, holiday})

Returns the earliest ending date to achieve number_of_workdays (Monday-Friday) if starting at start_date taking into account any optionally listed holidays. Start_date and holiday should be valid dates or timestamps.

Examples:

lastworkdate ('2007-02-19', 9) returns '2007-03-01' 

lastworkdate ('2006-12-18', 8, '2006-12-25', '2006-12-26') returns '2006-12-29' 

2 Replies
MVP
MVP

Re: Operação com datas e dias úteis

try with

lastworkdate

from Qlik help

lastworkdate(start_date, no_of_workdays {, holiday})

Returns the earliest ending date to achieve number_of_workdays (Monday-Friday) if starting at start_date taking into account any optionally listed holidays. Start_date and holiday should be valid dates or timestamps.

Examples:

lastworkdate ('2007-02-19', 9) returns '2007-03-01' 

lastworkdate ('2006-12-18', 8, '2006-12-25', '2006-12-26') returns '2006-12-29' 

Not applicable

Re: Operação com datas e dias úteis

Great!

Thanks a lot!