Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Tags (1)
18 Replies
hrlinder
Honored Contributor

Re: MonthName function

just use function date

date(yourdatefield,'MMM-YYYY')

Not applicable

Re: MonthName function

Hi,

I tried using this but couldn't find the exact solution.

I am not getting any item in the list box.

Regards

Priyanka

hrlinder
Honored Contributor

Re: MonthName function

use expression in multibox

Re: MonthName function

See if this helps:

SET DateFormat='D-MMM-YY';

Table:

LOAD [Planned Completion Date],

    [Revised Completion Date],

    MonthName([Planned Completion Date]) as Test1,

    MonthName([Revised Completion Date]) as Test2,

    Date([Planned Completion Date], 'MMM-YYYY') as Test3,

    Date([Revised Completion Date], 'MMM-YYYY') as Test4

FROM

export.csv

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);


Capture.PNG

Re: MonthName function

Use below as an expression in MultiBox or ListBox

Date(Date#([Planned Completion Date],'DD-MMM-YY'),'MMM-YYYY')

narband2778
New Contributor III

Re: MonthName function

Hi Manish,

Why are you using Date#  function in your expression.

As planned completion date field is number format.

Is there any specific reason to use Date#.........

Thanks,

Naresh

krishna20
Valued Contributor

Re: MonthName function

Hi Naresh,

Refer the below link.you will get an idea.

The Date Function

Not applicable

Re: MonthName function

Hi,

I tries using the above expression but it didn't work in my case.

I am getting a empty multibox

narband2778
New Contributor III

Re: MonthName function

Got it.

Thanks Krishna

KR,

Naresh

Community Browser