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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Conversion Format

Hi All,

I have a variable declared

                  vCurrentMonthYear = 012015;

Using the above variable am able to retrieve the month and year as shown below

      Upper(Date(MakeDate(RIGHT($(vCurrentMonthYear), 4), LEFT($(vCurrentMonthYear), 2)), 'MMM YYYY'));= JAN 2015


Now, how can i get    "Jan-2015"  using the  same variable.

1 Solution

Accepted Solutions
sunny_talwar

Try this:


Date(MakeDate(RIGHT($(vCurrentMonthYear), 4), LEFT($(vCurrentMonthYear), 2)), 'MMM-YYYY')

or

MonthName(Date(MakeDate(RIGHT($(vCurrentMonthYear), 4), LEFT($(vCurrentMonthYear), 2)), 'MMM YYYY'));

View solution in original post

6 Replies
Not applicable
Author

Hi,

Try:

=Dual(Month(Date#(vCurrentMonthYear,'MMYYYY'))&'-'&Year(Date#(vCurrentMonthYear,'MMYYYY')),Date#(vCurrentMonthYear,'MMYYYY'))

Hope this helps.

Kind regards,

Nuno

sunny_talwar

Try this:


Date(MakeDate(RIGHT($(vCurrentMonthYear), 4), LEFT($(vCurrentMonthYear), 2)), 'MMM-YYYY')

or

MonthName(Date(MakeDate(RIGHT($(vCurrentMonthYear), 4), LEFT($(vCurrentMonthYear), 2)), 'MMM YYYY'));

Not applicable
Author

Thanks for your quick response.

Not applicable
Author

Thanks for your quick response.

sunny_talwar

No problem, I am glad it worked

Best,

Sunny

MarcoWedel

Hi,

another possibility could be:

=Date(Date#(vCurrentMonthYear,'MMYYYY'),'MMM-YYYY')

QlikCommunity_Thread_161507_Pic1.JPG

hope this helps

regards

Marco