Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
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
Partner - Champion III
Partner - Champion III

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!