<?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: Worng type of output in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896545#M312043</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Date#() formats input text strings into a dual date value.&lt;/P&gt;&lt;P&gt;To format the output date you need to use Date() to convert the output value to the required format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This post by Henric Cronstrom&amp;nbsp; &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt;‌ has a clear explanation on formatting dates for input and output&amp;nbsp; &lt;A href="https://community.qlik.com/qlik-blogpost/2622"&gt;Get the Dates Right&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 May 2015 18:09:08 GMT</pubDate>
    <dc:creator>Colin-Albert</dc:creator>
    <dc:date>2015-05-20T18:09:08Z</dc:date>
    <item>
      <title>Date#() function: Worng type of output</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896543#M312041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to convert a text date into its numeric value using the Date#(...) function but for some reason it is not working properly.&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the piece of code I'm using for testing:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;LET vMinDateText = MakeDate(2015,03);&lt;/P&gt;&lt;P&gt;LET vMaxDateText = Today(1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = Date#('$(vMinDateText)','DD/MM/YYYY');&lt;/P&gt;&lt;P&gt;LET vMaxDate = Date#('$(vMaxDateText)','DD/MM/YYYY');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRACE &amp;gt;&amp;gt;&amp;gt; vMinDateText: $(vMinDateText);&lt;/P&gt;&lt;P&gt;TRACE &amp;gt;&amp;gt;&amp;gt; vMaxDateText: $(vMaxDateText);&lt;/P&gt;&lt;P&gt;TRACE &amp;gt;&amp;gt;&amp;gt; vMinDate: $(vMinDate);&lt;/P&gt;&lt;P&gt;TRACE &amp;gt;&amp;gt;&amp;gt; 'vMaxDate: $(vMaxDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The output displayed in the running script window is:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; vMinDateText: 1/03/2015&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; vMaxDateText: 20/05/2015&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; vMinDate: 1/03/2015&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; vMaxDate: 20/05/2015&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see the data type stays the same. vMinDate and vMaxDate are texts instead of numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on what I have been doing wrong ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 12:06:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896543#M312041</guid>
      <dc:creator />
      <dc:date>2015-05-20T12:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date#() function: Worng type of output</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896544#M312042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Date# function merely turns a string into a date. It gets the default date format of your document unless you use the date() function to specify a format explicitly. If you want a number then use a function that returns a number (like the num function) on it: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LET vMinDate = num(Date#('$(vMinDateText)','DD/MM/YYYY'));&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 18:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896544#M312042</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-05-20T18:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date#() function: Worng type of output</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896545#M312043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Date#() formats input text strings into a dual date value.&lt;/P&gt;&lt;P&gt;To format the output date you need to use Date() to convert the output value to the required format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This post by Henric Cronstrom&amp;nbsp; &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt;‌ has a clear explanation on formatting dates for input and output&amp;nbsp; &lt;A href="https://community.qlik.com/qlik-blogpost/2622"&gt;Get the Dates Right&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 18:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896545#M312043</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-05-20T18:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date#() function: Worng type of output</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896546#M312044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Gysbert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I indeed needed a number so I used the num fonction as you advised and it is working fine now. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 09:11:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896546#M312044</guid>
      <dc:creator />
      <dc:date>2015-05-21T09:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Date#() function: Worng type of output</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896547#M312045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sharing the Get the dates Right post &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 09:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-Worng-type-of-output/m-p/896547#M312045</guid>
      <dc:creator />
      <dc:date>2015-05-21T09:18:03Z</dc:date>
    </item>
  </channel>
</rss>

