Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
maternmi
Creator II
Creator II

to separate the "year, month or both" from a date e.g. 18.10.2013


Hello everybody,

I have a dimension order income date (e.g. 18.10.2013), but I would like to create a new dimensions like order income year (e.g 2013) or month(e.g. 10/Oct.) or both (e.g.10.2013/Oct. 2013) based on the order income date. Can somebody help me?

Thank you in advance!

Best regards,

Michael

1 Solution

Accepted Solutions
salto
Specialist II
Specialist II

I think it is best to do it in the script so the data is already in the correct format and can be easily reused throughout the whole script.

If such thing is not posible, then you will need to do it in every formula in the Qlikview Document.

View solution in original post

5 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Use the Year(income date) as Year

                  Month(Income Date) as Month,

                  Monthanme (Income Date) as Month_Year.

     This will  be applicable if the income date is in Date format.

     If its text format then use this.

     Year(Date(Date#(Income Date,'DD.MM.YYYY')))

          Month(Date(Date#(Income Date,'DD.MM.YYYY')))

     Monthname(Date(Date#(Income Date,'DD.MM.YYYY')))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
salto
Specialist II
Specialist II

Hello,

there are several date functions that might help you in this tak.

If your initial data is 18.10.2013:

Year(replace('18.10/.2013','.','/')) will return 2013

Month(replace('18.1.2013','.','/')) will return Oct

Monthname(replace....) will return oct 2013

DayName, DayStart... will give you different results that might be of interest for your task.

Hope this helps.

maternmi
Creator II
Creator II
Author

Thank you for your help, I guess I have to do these modifications within the script, don't I? The thing is, I'm QlikView designer and not developer. So I search for a way to do this outside the script.

best regards,

Michael

salto
Specialist II
Specialist II

I think it is best to do it in the script so the data is already in the correct format and can be easily reused throughout the whole script.

If such thing is not posible, then you will need to do it in every formula in the Qlikview Document.

maternmi
Creator II
Creator II
Author

Hi,

I will talk with developer.

Thank you for you help!

Best regards,

Michael