1 Reply Latest reply: Mar 17, 2015 9:25 PM by Rob Wunderlich RSS

    There is possible to Set as Vdate='1900-01-01' in QlikView?

    Shivendoo Kumar

      Hi Guys,


      When I am trying to Set a variable to a date value '1900-01-01', I am getting output as '1905-03-12'. I am getting getting why it is evaluating like this. Please see the below sample script.



      SET DateFormat='YYYY-MM-DD';

      SET vDate='1900-01-01';

      SET vTwoYearsOldDate=DATE($(vDate));

      LET vTwoYearsOldDateKey=DATE($(vTwoYearsOldDate),'YYYYMMDD');

      SET vTwoYearsOldYearMonth=YEAR($(vTwoYearsOldDate))&'_'&MONTH($(vTwoYearsOldDate));





      $(vTwoYearsOldDate) AS TwoYearsOldDate,

      $(vTwoYearsOldDateKey) AS TwoYearsOldDateKey,

      $(vTwoYearsOldYearMonth) AS TwoYearsOldYearMonth