Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MonthName function

Hi Team,

I have a csv data source containing Date column in the format 'DD-MMM-YY eg: 22-Oct-15.

I want to display this dates in the format MMM-YYYY in multibox.

I tries this by using MonthName() function but couldn't find any solution.

Please help me out. Attached is the csv for your reference.

Thanks in advance

Regards

Priyanka

18 Replies
sunny_talwar

Did you look at the script I provided above? May be that helps?

sasikanth
Master
Master

HI,

Try something like this,

Date(date#([Revised Completion Date],'DD-MMM-YY'),'MMM-YYYY') as MonthAndYear

vishsaggi
Champion III
Champion III

Hello Priyanka,

Did you try using Sunny's script or qvw file he sent??

Can you send us your qvw file where you cant see the dates in Multibox here.

Thanks,
V.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Rudolf,

I would think your solution would work. But I suggest adding MonthStart() to generate only one row per MMM-YYYY value.

=date(MonthStart(yourdatefield),'MMM-YYYY')

-Rob

Not applicable
Author

Hi,

I tried you script and its dosent work for me.

belowis the screenshot for your reference.Sunnys script.png

sasikanth
Master
Master

HI ,

please find the attached applicaiton

swuehl
MVP
MVP

That's because your Date field values are not read in as dates (i.e. intepreted as dates by QV and having a numeric representation).

Your date format seems to be 'DD/MMM/YY' instead of 'DD-MMM-YY'.

Try to adapt your code with the correct input value format.

SET DateFormat = 'DD/MMM/YY';

Note that two digit year format is ambiguous, might lead to some 'wrong' 4 digit year values when QV tries to intepret these values.

edit:

See also

Why don’t my dates work?

Not applicable
Author

Hi,

Thank you very much.

It solved my problem

Thanks once again

Regards

Priyanka

vishsaggi
Champion III
Champion III

Hey Priyanka,

Can you close the thread by marking as Helpful or Answered if it resolved your issue.

Many thanks,

V.