<?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 Re: If statement in script to compare QVD save date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733896#M721692</link>
    <description>&lt;P&gt;Hi, thanks for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, single quotes didn't fix it either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached the QVW i am using.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Aug 2020 18:36:04 GMT</pubDate>
    <dc:creator>CNH_1978</dc:creator>
    <dc:date>2020-08-06T18:36:04Z</dc:date>
    <item>
      <title>If statement in script to compare QVD save date</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733854#M721690</link>
      <description>&lt;P&gt;Hi, Can anyone tell me what is wrong with this script please?&lt;/P&gt;&lt;P&gt;let vQVDPath = 'C:\Users\User1\Desktop\';&lt;BR /&gt;let vToday = date(today(),'DD/MM/YYYY');&lt;/P&gt;&lt;P&gt;let vQVD_Date =&amp;nbsp;date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY') ; \\ only added to confirm date&lt;/P&gt;&lt;P&gt;if date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY') = $(vToday) then&lt;/P&gt;&lt;P&gt;SET vResult = Yes;&lt;/P&gt;&lt;P&gt;ELSE&lt;/P&gt;&lt;P&gt;SET vResult = No;&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to compare todays date with the save time of the QVD, if the date matches then output YES otherwise output NO.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems to output NO even though the dates match (as seen below..&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CNH_1978_0-1596731041205.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/38656i42E09FE76699F2CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CNH_1978_0-1596731041205.png" alt="CNH_1978_0-1596731041205.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733854#M721690</guid>
      <dc:creator>CNH_1978</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: If statement in script to compare QVD save date</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733889#M721691</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try changing your if to:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY') = '$(vToday)' then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(put single quotes on vToday)&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 18:08:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733889#M721691</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2020-08-06T18:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: If statement in script to compare QVD save date</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733896#M721692</link>
      <description>&lt;P&gt;Hi, thanks for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, single quotes didn't fix it either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached the QVW i am using.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 18:36:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733896#M721692</guid>
      <dc:creator>CNH_1978</dc:creator>
      <dc:date>2020-08-06T18:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: If statement in script to compare QVD save date</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733898#M721693</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I think the QvdCreateTime() function will return a timestamp, so try and wrap it in the left() function..&lt;/P&gt;&lt;P&gt;if &lt;FONT color="#339966"&gt;left(&lt;/FONT&gt;date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY')&lt;FONT color="#339966"&gt;,10&lt;/FONT&gt;) = '$(vToday)' then&lt;/P&gt;&lt;P&gt;I think that should work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 18:44:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733898#M721693</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2020-08-06T18:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: If statement in script to compare QVD save date</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733899#M721694</link>
      <description>&lt;P&gt;Fantastic, that is working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 18:46:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-in-script-to-compare-QVD-save-date/m-p/1733899#M721694</guid>
      <dc:creator>CNH_1978</dc:creator>
      <dc:date>2020-08-06T18:46:35Z</dc:date>
    </item>
  </channel>
</rss>

