Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Get the month from dates

I have a column with dates in the format 'DD-MM-YY'.
How can I get the value of the month, in a loading script?

I need to create a separate column in which I have to assign every date a month name.
Long story short, assuming I got a table column with the date in the mentioned format, how can I get the output below?

DateMonth
10-01-17January
20-02-17February
15-03-17March
11-04-17April
14-05-17May
20-06-17June
19-07-17July
18-08-17August
28-09-17September
28-10-17October
26-11-17November
23-12-17December
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Get the month from dates

Set DateFormat ='DD-MM-YY';

LOAD Date,

          Month(Date) as ShortMonth,

          Text(Date(Date, 'MMMM')) as LongMonth

FROM ...;

edit:

or

...

  Dual(Date(Date, 'MMMM'),Month(Date) ) as LongMonth


to keep the numerical month number in long format, too

View solution in original post

4 Replies
Highlighted
MVP
MVP

Re: Get the month from dates

Set DateFormat ='DD-MM-YY';

LOAD Date,

          Month(Date) as ShortMonth,

          Text(Date(Date, 'MMMM')) as LongMonth

FROM ...;

edit:

or

...

  Dual(Date(Date, 'MMMM'),Month(Date) ) as LongMonth


to keep the numerical month number in long format, too

View solution in original post

Highlighted
Champion III
Champion III

Re: Get the month from dates

try this

Test:

LOAD * , date(Date#(Date,'DD-MM-YYYY'),'MMMM')  as Rebate_New;

LOAD * Inline [

Date

10-01-17

];

Highlighted
Creator II
Creator II

Re: Get the month from dates

Thanks! That's it

Highlighted
Champion III
Champion III

Re: Get the month from dates

great:) please close the thread by making correct and helpful answer:)