<?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: Creating Year from Given Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699890#M1066614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Sep 2014 11:31:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-03T11:31:22Z</dc:date>
    <item>
      <title>Creating Year from Given Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699885#M1066601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a field say CreatedOn, I am trying to create Academic Year with the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(date(createdon,'DD/MMM/YYYY')&amp;gt;='01/Oct/2013' and date(createdon,'DD/MMM/YYYY')&amp;lt;='31/Aug/2014', 'AY 2014',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(date(createdon,'DD/MMM/YYYY')&amp;gt;='01/Sep/2014' , 'AY 2015')) as @AcademicYear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It working but I am not getting my data accurate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could some body suggest why it is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is their any syntax issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 11:12:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699885#M1066601</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T11:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Year from Given Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699886#M1066603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Provide sample data or apps...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 11:20:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699886#M1066603</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-09-03T11:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Year from Given Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699887#M1066605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14097432644929308" jivemacro_uid="_14097432644929308"&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;Hi, Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="_jivemacro_uid_14097432644731248 jive_text_macro jive_macro_code" jivemacro_uid="_14097432644731248" modifiedtitle="true"&gt;
&lt;P&gt;CALENDAR:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;CreatedOn,&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;if(createdon &amp;gt;= YearStart(createdon, 0,10) AND createdon &amp;lt;= YearEnd(createdon,0,10), YEAR(YEARSTART(createdon,0,10))+1) as @AcademicYear ;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 11:20:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699887#M1066605</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2014-09-03T11:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Year from Given Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699888#M1066607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are comparing dates as strings so the resulat fo the comparison is not what you intended to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(createdon&amp;gt;=Date#('01/Oct/2013', &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'DD/MMM/YYYY'&lt;/SPAN&gt;) and createdon&amp;lt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date#(&lt;/SPAN&gt;'31/Aug/2014'&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'DD/MMM/YYYY'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;)&lt;/SPAN&gt;, 'AY 2014',&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(createdon&amp;gt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date#(&lt;/SPAN&gt;'01/Sep/2014'&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'DD/MMM/YYYY'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;) &lt;/SPAN&gt; , 'AY 2015')) as @AcademicYear&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;hope this helps&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;regards&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 11:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699888#M1066607</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-09-03T11:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Year from Given Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699889#M1066611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are comparing numeric dates to text dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your hard coded dates use something like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(date#(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'01/Oct/2013' &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;,'DD/MMM/YYYY')&lt;/SPAN&gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;,'DD/MMM/YYYY')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 11:24:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699889#M1066611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T11:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Year from Given Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699890#M1066614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 11:31:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699890#M1066614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T11:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Year from Given Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699891#M1066615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or something like this may be more elegant :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if ( (month( today())&amp;nbsp; ) &amp;gt;=&amp;nbsp; 10 , year(today()) , ( year(today() ) - 1 ) ) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 11:31:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699891#M1066615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T11:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Year from Given Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699892#M1066616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am following a cycle from September to August. For this fiscal year we do not have September, so we are following from Oct- Aug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for next fiscal year we will be following Sept-Aug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have CreatedOn Field with Date values, is it possible to create Dynamic fiscal year from this field with the cycle Sept-Aug&lt;BR /&gt;??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 11:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Year-from-Given-Dates/m-p/699892#M1066616</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T11:49:53Z</dc:date>
    </item>
  </channel>
</rss>

