<?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 Time since Macro has run in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Time-since-Macro-has-run/m-p/195066#M55734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd think you'd just set a variable to now() in the macro or as a separate action along with the macro trigger. The time since the macro was last run is interval(Variable-now()). But yeah, if you want that number preserved even when exiting and reentering the application, you'd probably need to fiddle with something like Gordon suggests.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Sep 2010 21:03:21 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-09-09T21:03:21Z</dc:date>
    <item>
      <title>Time since Macro has run</title>
      <link>https://community.qlik.com/t5/QlikView/Time-since-Macro-has-run/m-p/195064#M55732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Im aware you can create a text box to display the time since a report has been Reloaded, is it possible to display the time a Macro was last run?&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;Gerard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 14:12:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-since-Macro-has-run/m-p/195064#M55732</guid>
      <dc:creator />
      <dc:date>2010-09-09T14:12:07Z</dc:date>
    </item>
    <item>
      <title>Time since Macro has run</title>
      <link>https://community.qlik.com/t5/QlikView/Time-since-Macro-has-run/m-p/195065#M55733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Within the macro you could output the date/time to a file that gets loaded by the script. If you append to the file then use 'max' to get the most recent.&lt;/P&gt;&lt;P&gt;This is some macro code I use to record when some data is exported, which should give you some ideas:&lt;/P&gt;&lt;P&gt;set doc=ActiveDocument&lt;BR /&gt;&lt;BR /&gt;vExportLog = doc.Variables("vExportLog").GetContent.String ' get log name&lt;BR /&gt;&lt;BR /&gt;set fso = CreateObject("Scripting.FileSystemObject")&lt;/P&gt;&lt;P&gt;on error resume next&lt;/P&gt;&lt;P&gt;set logFile = fso.GetFile(vExportLog)&lt;/P&gt;&lt;P&gt;if err &amp;lt;&amp;gt; 0 then ' file does not exist&lt;BR /&gt; on error goto 0&lt;BR /&gt; set logFile = fso.CreateTextFile(vExportLog)&lt;BR /&gt; set logFile = fso.GetFile(vExportLog)&lt;BR /&gt;else&lt;BR /&gt; on error goto 0&lt;BR /&gt; end if&lt;/P&gt;&lt;P&gt;set txsStream = logFile.OpenAsTextStream(8) ' append&lt;BR /&gt;txsStream.WriteLine Now &amp;amp; " " &amp;amp; vExportTo &amp;amp; " created by " &amp;amp; doc.GetProperties.FileName&lt;BR /&gt;txsStream.WriteLine Now &amp;amp; " " &amp;amp; vExportTo_1 &amp;amp; " created by " &amp;amp; doc.GetProperties.FileName&lt;BR /&gt;txsStream.Close&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 15:48:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-since-Macro-has-run/m-p/195065#M55733</guid>
      <dc:creator />
      <dc:date>2010-09-09T15:48:05Z</dc:date>
    </item>
    <item>
      <title>Time since Macro has run</title>
      <link>https://community.qlik.com/t5/QlikView/Time-since-Macro-has-run/m-p/195066#M55734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd think you'd just set a variable to now() in the macro or as a separate action along with the macro trigger. The time since the macro was last run is interval(Variable-now()). But yeah, if you want that number preserved even when exiting and reentering the application, you'd probably need to fiddle with something like Gordon suggests.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 21:03:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-since-Macro-has-run/m-p/195066#M55734</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-09T21:03:21Z</dc:date>
    </item>
  </channel>
</rss>

