Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Dates.

Hi All,

I have the following script that sets up my variables:

Let vCurrYear=year(today());

Let vCurrMonth=month(today());

Let vCurrDay= (I want this variable to be set to the previous day in date format)

Let vPrevYear=Year(AddYears(today(), -1));

Let vPrevMonth=Month(AddMonths(today(),-1));

Let vPrevDay=(I want this variable to be set to the vCurrentDay-1 day in date format)

Please help,

1 Solution

Accepted Solutions
crusader_
Valued Contributor

Re: Dates.

Hi

Try this

Let vCurrDay= date(today()-1)

and

Let vPrevDay = date(today()-2)


Hope this helps.

Andrei

3 Replies
crusader_
Valued Contributor

Re: Dates.

Hi

Try this

Let vCurrDay= date(today()-1)

and

Let vPrevDay = date(today()-2)


Hope this helps.

Andrei

Not applicable

Re: Dates.

ok so thats sets up the variables great, but the my set analysis doesn't

Sum({1<call_date = {$(vCurrDay)}>} calls_offered)

crusader_
Valued Contributor

Re: Dates.

Hi,

Please check variable value and your call_date in text object.

And ensure that call_date has a date format.

HTH

Andrei