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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

MTD variable

Hi,

The below variable gives '1160801' which is century format and actual date is '08/01/2016'.

But i need the below variable which gives the date '1160828'  wchi means '08/28/2016'.

Let CurrentyearYesterday=1&date(date(monthstart(today()),'MM/DD/YYYY'),'YYMMDD');

Thanks..

1 Solution

Accepted Solutions
nareshthavidishetty
Creator III
Creator III
Author

Hi,

Got it..

Let CurrentyearYesterday=1&date(date((today())-1,'MM/DD/YYYY'),'YYMMDD');

Thanks,,

View solution in original post

6 Replies
nareshthavidishetty
Creator III
Creator III
Author

Hi,

Got it i forget there is an monthstart in the variable replacing monthstart with month fixed the issue.

Let CurrentyearYesterday=1&date(date(month(today()-1),'MM/DD/YYYY'),'YYMMDD');

Thanks..

nareshthavidishetty
Creator III
Creator III
Author

Oh am sorry..

The above isn't right..

Please check it once..

Thanks...

nareshthavidishetty
Creator III
Creator III
Author

Hi,

Got it..

Let CurrentyearYesterday=1&date(date((today())-1,'MM/DD/YYYY'),'YYMMDD');

Thanks,,

tamilarasu
Champion
Champion

Hi Naresh,

Try this,

Let CurrentyearYesterday =(Year((Today()))-1900) & Num(Month(Today()),'00') & Num(Day(Today()-1),'00') ;

nareshthavidishetty
Creator III
Creator III
Author

Thanks... Nagraj for response and the issue is resolved as per the previous post..

tamilarasu
Champion
Champion

I'm a bit late. Just thought to share my idea.