7 Replies Latest reply: Sep 27, 2018 7:26 AM by colin odonnell RSS

    Dates and Data Model Viewer

    colin odonnell

      Have a bit of a curious case here.

       

      Using Qlik Sense Desktop April 2018.

      System variables are:

      SET DateFormat='DD/MM/YYYY';

      SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

       

      I am loading dates from a CSV file via the Load Editor.

      When loaded raw "as is", in the data model viewer they are in the format YYYY-MM-DD

      The following tags have been added $number $integer $timestamp $date

       

      So I want the dates in the same format as the System variables.

       

      As part of my data transformation strategy I leave the original field "raw" and the following formula works:

      Load

      DateField,

      Date (DateField) as DateField1   //this changes the date format from YYYY-MM-DD to DD/MM/YYYY which is what I want

       

      So next, I then comment out DateField,  remove the 1 from DateField1 and reload i.e.

       

      Load

      //DateField,

      Date (DateField) as DateField

       

      But now, DateField is back to the wrong format i.e. the format it was in when it first loaded.

      For some reason, no matter what I try when the field name remains the same, it always loads back to the original format.

       

      s a work around, I leave the '1' in place and rename the field at the end using:

      Rename field DateField1 to DateField;

       

      ts almost like QS has decided that the date format should remain in the same format as the original load.

      Any yes, I have tried turning it off and on again

       

      Thanks,