Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
mihai_iov
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
swuehl
MVP
MVP

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

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

Chanty4u
MVP
MVP

try this

Test:

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

LOAD * Inline [

Date

10-01-17

];

mihai_iov
Creator II
Creator II
Author

Thanks! That's it

Chanty4u
MVP
MVP

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