19 Replies Latest reply: Oct 5, 2013 1:39 PM by Stefan Wühl RSS

    Divide date into day, month and year


      I am sort of a newbie to Qkliview, so I hope someone can help me with the following problem.


      In my database I have a field called "Eingangsmonat", which looks originally like this:

      e.g. : "01.04.2011  00:00:00"


      First I thought the 00:00:00 could be a problem, but when I select it as a field, I can change the date format, so Qlikview

      recognizes the input data as a date.


      Now I did the following in the script:


      LOAD Eingangsmonat,

        year(Eingangsmonat) as Jahr,

        month(Eingangsmonat) as Monat,

        day (Eingangsmonat) as Tag;


      It shows no error, but after running the script, I do not have new fields like Jahr, Monat, Tag....

      What am I doing wrong?


      How can I change the script to make it work?

      Or alternatively: Can I use the existing Field "Eingangsmonat" and kind of "manipoulate it", to be able to select a whole year?

      When I change format to YYYY, then I have every year twelve time (as I have 01.01.2010, 01.02.2010, 01.03.2010 behind it).


      Thanks in advance for any tip!