Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
How do you do more sophistcated date calculations like monthstart, addmonths, monthend, yearstart, addyears and yearend (just a few examples).
I can't find any documentation on this.
Many thanks
Kingsley
Hi Kingsley,
These are Qlik Sense calculations, they are unrelated to Qlik Application Automation.
If you want to learn more about date functions in Qlik Cloud, see Qlik Cloud - Date and time functions
If you want to edit dates inside automations, I suggest you use the date formula, see Qlik Application Automation - Date functions
Kind regards,
Emile
Hi Kingsley,
These are Qlik Sense calculations, they are unrelated to Qlik Application Automation.
If you want to learn more about date functions in Qlik Cloud, see Qlik Cloud - Date and time functions
If you want to edit dates inside automations, I suggest you use the date formula, see Qlik Application Automation - Date functions
Kind regards,
Emile
Hi Emile.
Thanks for your video on QAA and showing how to store as QVDs. This automation that you and the team have done is super helpful!
Following your tutorial, I'm using the now function in the automation, but our billing months are from 26th - 25th of the following month. I'm essentially trying to store what month it is in a variable so I can make a selection on a field in an app. Here are examples:
if now = 25 May 2022. Output = 2022/05
if now = 26 May 2022. Output = 2022/06
if now = 13 June 2022. Output = 2022/06 etc
I understand that the code I presented was not correct for automation but I'm looking for how I can do that in QAA. In normal QS Load script it would look like:
let vCurrentMonth = date(addmonths(monthstart(today()-26), 1), 'YYYY/MM')
Any ideas how I can replicate that in QAA?
Many thanks
Kingsley
Hi Kingsley,
Could you try the following? First, use a condition block to validate whether or not the current date is in the correct month. If it is, use the current month. If not, use the current month + 1 month.
Please note that the datetime format that Qlik Sense uses internally is not yet supported in automations. You can work around this by using the Select Field Value By Query block to make selections by the textual representation of a date (instead of the numeric representation which is not yet supported).
Kind regards,
Emile
Hi Emile,
I stumbled on this post and it helped me fix something I was working on.
In your screenshot you wrote {date: 'last month','Y/m'}. Where can I find more information on the 'last month' bit? What is it called and what other things can I write such as now, last month etc? If so is there a list somewhere similar the Date functions link?