Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

WeekDay() created as variable in script

Hey guys,

I’ve been playing around with WeekDay(now()) in my incremental loader script for qvds as we’re trying to perform full reloads every Sunday.

Previously I was using:

LET vDayOfWeek = WeekDay(now());

IF $(vDayOfWeek) = 'Sun' THEN

This returns false, however when I use:

IF WeekDay(now()) = 'Sun' THEN

And suddenly it works. I'm just curious as to why this happens, Is there any reason it wouldn't be working as a variable?

Tags (1)
1 Solution

Accepted Solutions

Re: WeekDay() created as variable in script

You need to single quote your variable ref.

If '$(vDayOfWeek)' ...

Take a look at the document log to understand what's going on.

-Rob

2 Replies

Re: WeekDay() created as variable in script

You need to single quote your variable ref.

If '$(vDayOfWeek)' ...

Take a look at the document log to understand what's going on.

-Rob

Not applicable

Re: WeekDay() created as variable in script

Thanks Rob,

Works perfectly and I hadn't even thought to check the document log to resolve it.

Community Browser