<?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: Date#() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/403933#M150281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Faisal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should work just fine. Take a look at this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13475288916563937" jivemacro_uid="_13475288916563937"&gt;&lt;P&gt;=Date(Date#('3/9/12', 'DD/MM/YYYY'))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even not using the leading zeroes for day and month and the century, the date returned is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Sep 2012 09:35:19 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2012-09-13T09:35:19Z</dc:date>
    <item>
      <title>Date#() function</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/403932#M150280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I'm loading data from an excel file and one of the fields is a date field. It mostly has dates in the form 'DD/MM/YYYY' however excel sometimes automatically reduces the field to the form 'D/M/YYYY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence when i use the function DATE#(String,'DD/MM/YYYY') it doesnt correctly convert dates which are in the 'D/M/YYYY' form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 09:27:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function/m-p/403932#M150280</guid>
      <dc:creator />
      <dc:date>2012-09-13T09:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date#() function</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/403933#M150281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Faisal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should work just fine. Take a look at this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13475288916563937" jivemacro_uid="_13475288916563937"&gt;&lt;P&gt;=Date(Date#('3/9/12', 'DD/MM/YYYY'))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even not using the leading zeroes for day and month and the century, the date returned is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 09:35:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function/m-p/403933#M150281</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-09-13T09:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date#() function</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/403934#M150282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried it but it doesnt work for some reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a sample xls and qvw file to show you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 09:48:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function/m-p/403934#M150282</guid>
      <dc:creator />
      <dc:date>2012-09-13T09:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date#() function</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/403935#M150283</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;Yes, if you use the wizard you will see that there are dates with the format "DD/MM/YYYY" but there are "dates" that excel recognized but QlikView does not with the format "DD-MMM-YYYY" or just numeric "40100". You will see that at a glance when you just open the file and see how some values are right aligned (numeric correct date formatted) and some are left aligned (string date, literal).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to use the Alt() function then with all possible conditions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13475311922008763" jivemacro_uid="_13475311922008763"&gt;&lt;P&gt;LOAD Trader, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Date(Alt(Date#([Opening Date], 'DD/MM/YYYY'), [Opening Date], 'Invalid date')) as date&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;Date#.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 10:14:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function/m-p/403935#M150283</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-09-13T10:14:30Z</dc:date>
    </item>
  </channel>
</rss>

