<?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: Convert datetime to period in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619808#M228247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/srchilukoori"&gt;srchilukoori&lt;/A&gt;&lt;/STRONG&gt;. I'd like to do this but unfortunately the database is 3rd party and any changes to the database are very strongly discouraged. I suppose I could create a view instead, but I was rather hoping there would be a way to do this in either the load script or a formula.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Mar 2014 14:51:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-25T14:51:55Z</dc:date>
    <item>
      <title>Convert datetime to period</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619803#M228242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Our database uses 'Periods' in the financial year quite extensively. To clarify for anyone not familiar, an example of a period would be '201401', which would mean the first month in the 2014 financial year (April 2013). Similarly, the current period is '201412', meaning March 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; What I'm trying to do is compare data in a table which has a standard datetime field, rather than period information, to a standard set of variables containing period information. I am trying to count the number of matters opened up until the current period in the current financial year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The formula I'd &lt;STRONG&gt;like&lt;/STRONG&gt; to use is something like =Count({&amp;lt;MATTER.OPEN_DATE={$(YTD)}&amp;gt;} MATTER.CLNT_MATT_CODE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ...where the 'YTD' variable looks like "&amp;gt;=$(=Num(Left($(currentPeriod), 4) &amp;amp; '01'))&amp;lt;=$(=Num($(currentPeriod) - 1))"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ...and the 'currentPeriod' variable is 201412&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Because the MATTER.OPEN_DATE field is currently displayed in format '23/01/2009 00:00:00', the formula as it is will currently return no data. Can anyone suggest how I can convert the date as it is into the Period format described above, so that I can consistently count the data up until the current financial period? (Or any alternatives if there's a better way of doing this).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks, Gavin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 12:10:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619803#M228242</guid>
      <dc:creator />
      <dc:date>2014-03-25T12:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datetime to period</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619804#M228243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do one thing instead of changing in your set analysis,&lt;/P&gt;&lt;P&gt;You can Convert your '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;STRONG&gt;MATTER.OPEN_DATE&lt;/STRONG&gt;&lt;/SPAN&gt;' from timestamp to Date in Your Script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like Date(floor(&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MATTER.OPEN_DATE&lt;/STRONG&gt;),'DD/MM/YYYY') as New_MATTER.OPEN_DATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 12:31:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619804#M228243</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-25T12:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datetime to period</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619805#M228244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Creating a new Period field on the table will be an easier and much optimized way to implement your YTD logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 14:08:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619805#M228244</guid>
      <dc:creator>srchilukoori</dc:creator>
      <dc:date>2014-03-25T14:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datetime to period</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619806#M228245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you max dreamer - but I think this will still leave me with a date rather than a period?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 14:45:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619806#M228245</guid>
      <dc:creator />
      <dc:date>2014-03-25T14:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datetime to period</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619807#M228246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can format your date as you required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;Date(floor(&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MATTER.OPEN_DATE&lt;/STRONG&gt;),'YYYYMM') as New_MATTER.OPEN_DATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 14:49:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619807#M228246</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-25T14:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datetime to period</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619808#M228247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/srchilukoori"&gt;srchilukoori&lt;/A&gt;&lt;/STRONG&gt;. I'd like to do this but unfortunately the database is 3rd party and any changes to the database are very strongly discouraged. I suppose I could create a view instead, but I was rather hoping there would be a way to do this in either the load script or a formula.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 14:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619808#M228247</guid>
      <dc:creator />
      <dc:date>2014-03-25T14:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datetime to period</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619809#M228248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again max dreamer, that's looking good now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 15:04:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datetime-to-period/m-p/619809#M228248</guid>
      <dc:creator />
      <dc:date>2014-03-25T15:04:54Z</dc:date>
    </item>
  </channel>
</rss>

