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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out 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.

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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
MVP
MVP

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
MVP
MVP

No problem, I am glad it worked

Best,

Sunny

MarcoWedel
MVP
MVP

Hi,

another possibility could be:

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

QlikCommunity_Thread_161507_Pic1.JPG

hope this helps

regards

Marco