5 Replies Latest reply: Mar 17, 2017 5:29 AM by Prem Utukuri RSS

    Formatting a date variable in the script?

    Maria Poulsen

      Hi

       

      I have an application where I have made a pivot table. The user can export the data to Excel.

      The date variable is shown like this in the table: DD-MM-YYYY, but a user have reported to me, that when she export the data to her Excel, the variable is shown like this: MM-DD-YYYY.

       

      I have looked in properties in the Numbers tab, but there I can not see my variable/dimension. Only my expressions.

       

      Is it possible to define the dateformat in the script, where I load in the data?

       

      The data is loaded like this in Qlikview:

       

      ODBC CONNECT TO SASWB;

      Bedoem:
      SQL SELECT *
      FROM path.dataset;

       

      And when I load in the data in a testversion, it is loaded in via Excel:


      LOAD var1,
           var2,
           var3,
           var4,
           date,
           var6,
           var7;
      FROM
      [path\dataset.xlsx]
      (ooxml, embedded labels, table is dataset);

       

      Can I write something like:

      LOAD var1,

           var2,

           var3,

           var4,

           date format 'DD-MM-YYYY' ,

           var6,

           var7;

      FROM

      [path\dataset.xlsx]

      (ooxml, embedded labels, table is dataset);

       

      And how can I make this formatting when I read the data like this?:

      Bedoem:

      SQL SELECT *

      FROM path.dataset;

       

       

      Kind regards from Maria