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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
rdlccn70
Contributor III
Contributor III

Date

Hello,

I would like the following date format "001.2016" divided in month and year. -> 001 and 2016 or 1 and 2016

Name of the dimension is DATAEGV_PERIODE


The data comes in this form:

001.2016

002.2016

.....

012.2016

Does anyone have this idea?

Thanks in advance.

Erdal

14 Replies
rdlccn70
Contributor III
Contributor III
Author

Hi,

many thaks,

i have solved with:

Date#(left(right(DATAEGV_PERIODE,7),2),'MM') as Monat,

Date#(right(DATAEGV_PERIODE,4),'YYYY') as Jahr

Regards,

Erdal

Von: swuehl

Gesendet: Mittwoch, 10. Februar 2016 20:46

An: Cücen, Erdal, NMM-FF <Erdal.Cuecen@S4M.COM>

Betreff: Re: - Date

rdlccn70
Contributor III
Contributor III
Author

Hi,

many thanks,

i have solved with:

Date#(left(right(DATAEGV_PERIODE,7),2),'MM') as Monat,

Date#(right(DATAEGV_PERIODE,4),'YYYY') as Jahr

Regards,

Erdal

rdlccn70
Contributor III
Contributor III
Author

Hi,

many thaks,

i have solved with:

Date#(left(right(DATAEGV_PERIODE,7),2),'MM') as Monat,

Date#(right(DATAEGV_PERIODE,4),'YYYY') as Jahr

Regards,

Erdal

Von: Lokeshwari N

Gesendet: Donnerstag, 11. Februar 2016 09:45

An: Cücen, Erdal, NMM-FF <Erdal.Cuecen@S4M.COM>

Betreff: Re: - Date

Not applicable

 

LOAD
  (
mid(DATAEGV_PERIODE,5,4)) as Year
,
 
  (
mid(DATAEGV_PERIODE,1,3)) as Month

 
FROM
Table

 

swuehl
MVP
MVP

Erdal Cücen wrote:

Hi,

many thaks,

i have solved with:

Date#(left(right(DATAEGV_PERIODE,7),2),'MM') as Monat,

Date#(right(DATAEGV_PERIODE,4),'YYYY') as Jahr

If you do it like this, you won't get your year and month parsed in correctly (i.e. you will get values with an underlying numeric value based on a date, not on the commonly used month numbers 1-12 or years.

Maybe you won't notice any issues untill you try to make e.g. selections or numeric comparisons.

If you don't know what I am talking about, create a list box for Jahr field with an Expression

=num(Jahr)