<?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: Create a date variable using variables within my original data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253864#M1188091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike, can you post your code snippet here? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2012 16:46:11 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-08-29T16:46:11Z</dc:date>
    <item>
      <title>Create a date variable using variables within my original data</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253861#M1188088</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;My data set has variables called month and year, I would like to combine these with the day being equal to 1 in order to make a date. The reason behind this is so that I can then use the time series graphs to be able to properly compare time periods over the last 5 years (as an example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to do this within the script editor but I'm not sure of the syntax. I know how to create this in excel (or SAS code), I'm just not quite there yet with Qlikview!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, if there is an easier way, I'm open to all advice!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Rob &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2011 12:24:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253861#M1188088</guid>
      <dc:creator />
      <dc:date>2011-09-12T12:24:58Z</dc:date>
    </item>
    <item>
      <title>Create a date variable using variables within my original data</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253862#M1188089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can just add a line to your LOAD, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Month,&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Makedate(Year,Month) as Date,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;from Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MakeDate(Year, Month) creates a date: 1st day of Month in Year (this is equivalent to write Makedate(Year, Month, 1), since Day parameter defaults to 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is what you want, if not, just post your excel (preferred, or SAS) code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2011 23:23:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253862#M1188089</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-12T23:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date variable using variables within my original data</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253863#M1188090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you get this to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do a makedate on the load script and it says "'Makedate' is not a recognized built-in function name."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 16:33:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253863#M1188090</guid>
      <dc:creator />
      <dc:date>2012-08-29T16:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date variable using variables within my original data</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253864#M1188091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike, can you post your code snippet here? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 16:46:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253864#M1188091</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-29T16:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date variable using variables within my original data</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253865#M1188092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;swuehl - thanks for the reply....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I acutally figured out the first problem - had the makedate in the SELECT and not the LOAD.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but still not getting out exactly what I want with the code below - the month and year are coming in as string from the DB so I thought I needed to convert to number for the makedate....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the below code results in a - in the Date field.&amp;nbsp; same result without the Num# conversion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num#(Month,'0') as Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num#(Year,'0') as Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Makedate((Num#(Month,'0')), (Num#(Year,'0'))) as Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT ......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 20:36:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253865#M1188092</guid>
      <dc:creator />
      <dc:date>2012-08-29T20:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date variable using variables within my original data</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253866#M1188093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;makedate() function takes year as first argument, then an optional month as second, an optional day as third.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;Makedate( (Num#(Year,'0')),&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;(Num#(Month,'0'))&lt;/SPAN&gt;) as Date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;SQL SELECT ...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 21:27:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253866#M1188093</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-29T21:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date variable using variables within my original data</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253867#M1188094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah - right - stupid error on my part.&amp;nbsp; Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 21:41:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-date-variable-using-variables-within-my-original-data/m-p/253867#M1188094</guid>
      <dc:creator />
      <dc:date>2012-08-29T21:41:23Z</dc:date>
    </item>
  </channel>
</rss>

