<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Date formatting variable load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-formatting-variable-load-script/m-p/1746902#M453358</link>
    <description>&lt;P&gt;&lt;BR /&gt;Hello, I have this script below. You can see the vFileSuffix is setting the dataformat as YYYYMMDD. But when it saves, it is saving like this: DOLLAR_A_DAILY_LOGS_572080329.QVD. The vDate for example is 20200922, but the vFileSuffix is 572080329.&amp;nbsp; I want the file to be stored as&amp;nbsp;DOLLAR_A_DAILY_LOGS_20200922.QVD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FOR Each vDate in $(vDateList)&lt;/P&gt;&lt;P&gt;Let vFileSuffix = Date('$(vDate)','YYYYMMDD');&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD *;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM HIVE.table.`fact_table`&lt;BR /&gt;Where $(vWhereStatement);&lt;/P&gt;&lt;P&gt;Store Data into [$(vQVDFiles)\UAPI_HOURLY_LOGS_$(vFileSuffix).QVD] (QVD);&lt;BR /&gt;Drop Table Data;&lt;/P&gt;&lt;P&gt;NEXT vDate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried changing the&amp;nbsp;Let vFileSuffix = Date('$(vDate)','YYYYMMDD'); to&amp;nbsp;Let vFileSuffix = Date('$(vDate)','YYYY-MM-DD');, still didn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had first tried no formatting since the vDate comes in like vDate 20200922&amp;nbsp;(this is copied from debugging) like this vFileSuffix = Date('$(vDate).&amp;nbsp; That didn't work either&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 18:03:48 GMT</pubDate>
    <dc:creator>mp802377</dc:creator>
    <dc:date>2024-11-16T18:03:48Z</dc:date>
    <item>
      <title>Date formatting variable load script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-formatting-variable-load-script/m-p/1746902#M453358</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello, I have this script below. You can see the vFileSuffix is setting the dataformat as YYYYMMDD. But when it saves, it is saving like this: DOLLAR_A_DAILY_LOGS_572080329.QVD. The vDate for example is 20200922, but the vFileSuffix is 572080329.&amp;nbsp; I want the file to be stored as&amp;nbsp;DOLLAR_A_DAILY_LOGS_20200922.QVD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FOR Each vDate in $(vDateList)&lt;/P&gt;&lt;P&gt;Let vFileSuffix = Date('$(vDate)','YYYYMMDD');&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD *;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM HIVE.table.`fact_table`&lt;BR /&gt;Where $(vWhereStatement);&lt;/P&gt;&lt;P&gt;Store Data into [$(vQVDFiles)\UAPI_HOURLY_LOGS_$(vFileSuffix).QVD] (QVD);&lt;BR /&gt;Drop Table Data;&lt;/P&gt;&lt;P&gt;NEXT vDate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried changing the&amp;nbsp;Let vFileSuffix = Date('$(vDate)','YYYYMMDD'); to&amp;nbsp;Let vFileSuffix = Date('$(vDate)','YYYY-MM-DD');, still didn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had first tried no formatting since the vDate comes in like vDate 20200922&amp;nbsp;(this is copied from debugging) like this vFileSuffix = Date('$(vDate).&amp;nbsp; That didn't work either&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-formatting-variable-load-script/m-p/1746902#M453358</guid>
      <dc:creator>mp802377</dc:creator>
      <dc:date>2024-11-16T18:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date formatting variable load script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-formatting-variable-load-script/m-p/1746908#M453359</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25232"&gt;@mp802377&lt;/a&gt;&amp;nbsp; try this ?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FOR Each vDate in $(vDateList)

Let vFileSuffix = Date#('$(vDate)','YYYYMMDD');

Data:
LOAD *;
SQL SELECT *
FROM HIVE.table.`fact_table`
Where $(vWhereStatement);

Store Data into [$(vQVDFiles)\UAPI_HOURLY_LOGS_$(vFileSuffix).QVD] (QVD);
Drop Table Data;

NEXT vDate;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 24 Sep 2020 17:56:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-formatting-variable-load-script/m-p/1746908#M453359</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-09-24T17:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date formatting variable load script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-formatting-variable-load-script/m-p/1746929#M453362</link>
      <description>&lt;P&gt;Oh my word. I can't believe I missed the #. Thank you!&lt;/P&gt;&lt;P&gt;Martha&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 19:19:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-formatting-variable-load-script/m-p/1746929#M453362</guid>
      <dc:creator>mp802377</dc:creator>
      <dc:date>2020-09-24T19:19:26Z</dc:date>
    </item>
  </channel>
</rss>

