<?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 How to assign dynamic datetime field values to a variable in a Macro ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-assign-dynamic-datetime-field-values-to-a-variable-in-a/m-p/238228#M89155</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to assign a dynamic datetime field values to variables but do not know how to do this (specifically the QV syntax used in the expression) in a macro.&lt;/P&gt;&lt;P&gt;I have 2 variables, "vFromDate" and "vToDate" and would like to assign the values as below&lt;/P&gt;&lt;P&gt;vFromDate = &lt;STRONG&gt;timestamp&lt;/STRONG&gt;(&lt;B&gt;daystart&lt;/B&gt;(&lt;B&gt;min&lt;/B&gt;(&lt;B&gt;[Delivery Date (PDT)]&lt;/B&gt;)),'M/D/YYYY h:mm:ss TT')&lt;/P&gt;&lt;P&gt;vToDate = &lt;B&gt;timestamp&lt;/B&gt;(&lt;B&gt;dayend&lt;/B&gt;(&lt;B&gt;max&lt;/B&gt;(&lt;B&gt;[Delivery Date (PDT)]&lt;/B&gt;)),'M/D/YYYY h:mm:ss TT')&lt;/P&gt;&lt;P&gt;I understand that you can set a variable by using the "Set Variable" action. However I would like to find a way to do this inside a macro.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jul 2010 00:34:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-30T00:34:16Z</dc:date>
    <item>
      <title>How to assign dynamic datetime field values to a variable in a Macro ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-dynamic-datetime-field-values-to-a-variable-in-a/m-p/238228#M89155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to assign a dynamic datetime field values to variables but do not know how to do this (specifically the QV syntax used in the expression) in a macro.&lt;/P&gt;&lt;P&gt;I have 2 variables, "vFromDate" and "vToDate" and would like to assign the values as below&lt;/P&gt;&lt;P&gt;vFromDate = &lt;STRONG&gt;timestamp&lt;/STRONG&gt;(&lt;B&gt;daystart&lt;/B&gt;(&lt;B&gt;min&lt;/B&gt;(&lt;B&gt;[Delivery Date (PDT)]&lt;/B&gt;)),'M/D/YYYY h:mm:ss TT')&lt;/P&gt;&lt;P&gt;vToDate = &lt;B&gt;timestamp&lt;/B&gt;(&lt;B&gt;dayend&lt;/B&gt;(&lt;B&gt;max&lt;/B&gt;(&lt;B&gt;[Delivery Date (PDT)]&lt;/B&gt;)),'M/D/YYYY h:mm:ss TT')&lt;/P&gt;&lt;P&gt;I understand that you can set a variable by using the "Set Variable" action. However I would like to find a way to do this inside a macro.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 00:34:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-dynamic-datetime-field-values-to-a-variable-in-a/m-p/238228#M89155</guid>
      <dc:creator />
      <dc:date>2010-07-30T00:34:16Z</dc:date>
    </item>
    <item>
      <title>How to assign dynamic datetime field values to a variable in a Macro ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-dynamic-datetime-field-values-to-a-variable-in-a/m-p/238229#M89156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Anthony,&lt;/P&gt;&lt;P&gt;I'm thinking this should work:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set v = ActiveDocument.GetVariable("vFromDate")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;v.SetContent activedocument.Evaluate("timestamp(daystart(min([Delivery Date (PDT)])),'M/D/YYYY h:mm:ss TT')"),true&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I haven't tested it out though so you might have to play around with it a bit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 07:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-dynamic-datetime-field-values-to-a-variable-in-a/m-p/238229#M89156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-30T07:02:28Z</dc:date>
    </item>
  </channel>
</rss>

