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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Special Characters in Formatting

Hi,

I need to add a "/" within my date format (script). Date('01.01.2015', 'MM/YYYY'), but I don't get the expected result. Instead the month is divided by the year.

Can someone help?

Tanks in advance!

15 Replies
Not applicable
Author

Doesn't work for me. When using the variable the value is null

Not applicable
Author

When using LET ReportingMonth = Date(replace(today(),'.','/'),'MM/DD/YYYY'); the result is "6,1670..."

Not applicable
Author

it does work in an expression but not in script

vikramv
Creator III
Creator III

Hi,

U should use set.

Set ReportingMonth = date(date#(MonthStart(Today(),-1)),'MM/YYYY')

And then use as $(ReportingMonth)

Thanks,

Vikram.

Not applicable
Author

Thanks! I used "LET", but it works fine with "SET"

Anonymous
Not applicable
Author

Hi,

if you use "LET" you don't have to use "$" when you want to display the value of the variable.

If you use "SET" yuo must use "$" when you use your variable.

Elena