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

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date based on Variable

Hi

I am trying to create an SLA_Date in my load script using the order_date plus the SLA_Days which is a variable called vSLA. It's value is currently = 3. I tried this script:

Date(Order_Date + vSLA) As SLA_Date

but this failed. Any suggestions? Thank you.

Don

1 Solution

Accepted Solutions
Not applicable
Author

Thanks John. That worked. Just a question. Why do you include the $ if this is a load script? I'm still learning the scripting language.

View solution in original post

4 Replies
johnw
Champion III
Champion III

Date(Order_Date + $(vSLA)) As SLA_Date

Not applicable
Author

Thanks John. That worked. Just a question. Why do you include the $ if this is a load script? I'm still learning the scripting language.

johnw
Champion III
Champion III

Heh, to be honest, because it didn't work without it. I haven't really nailed down the rules for when I just state the variable and when I need to put $() around it. I'm sure they're simple, but so far it's been trivial for me to do it one way, and if it doesn't work, do it the other way. After five years, you'd think I'd have learned something as simple as this, but no. *chuckle*

Not applicable
Author

Well your a very kind and patient man for helping all these newbies like me. Smile Take care.