Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date

Hello everyone!

I have received a data set that has a date format of 'DD/MM/YYYY'. Is there any way to transfer it to display months and quarters separately? For example, I want to have a list box that will show 'Sept', 'Oct', etc and same for quarters, and be functional.

Thank you,

Anna

1 Solution

Accepted Solutions
Not applicable
Author

you can try something like below in the script and create a month field

MONTHMAPPING:

Mapping LOAD * INLINE

[ Name,number

  Jan,1

  Feb,2

  Mar,3

  Apr,4

  May,5

  Jun,6

  Jul,7

  Aug,8

  Sep,9

  Oct,10

  Nov,11

  Dec,12

];

ApplyMap('MONTHMAPPING', Month(Date(DateField, 'DD/MM/YYYY'))) AS Month

View solution in original post

5 Replies
Gysbert_Wassenaar

You can create new fields using the date field:

load

MyDate,

month(MyDate) as Month

'Q' & ceil(month(MyDate)/3) as Quarter

...other fields...

from ...somewhere...;


talk is cheap, supply exceeds demand
Not applicable
Author

you can try something like below in the script and create a month field

MONTHMAPPING:

Mapping LOAD * INLINE

[ Name,number

  Jan,1

  Feb,2

  Mar,3

  Apr,4

  May,5

  Jun,6

  Jul,7

  Aug,8

  Sep,9

  Oct,10

  Nov,11

  Dec,12

];

ApplyMap('MONTHMAPPING', Month(Date(DateField, 'DD/MM/YYYY'))) AS Month

Not applicable
Author

Month function will just return number I guess. we need a map as below

Not applicable
Author

Thank you! it works:)

Not applicable
Author

Thank you!