<?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 field contains values in different formats ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423661#M701273</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mayil, Celambarasan and Swarup for helping me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Both the above&amp;nbsp; solutions are excellent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mallikarjun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2012 19:58:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-19T19:58:19Z</dc:date>
    <item>
      <title>Date field contains values in different formats ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423657#M701269</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;&amp;nbsp;&amp;nbsp; I have a date field , this field contains dates in the following format (YYYY-MM-DD, DD-MM-YYYY and DD/MM/YYYY ).&lt;/P&gt;&lt;P&gt;&amp;nbsp; I want to convert all of these values&amp;nbsp; to one format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Any ideas ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Mallikarjun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 19:18:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423657#M701269</guid>
      <dc:creator />
      <dc:date>2012-09-19T19:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date field contains values in different formats ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423658#M701270</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; Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,Date(DateField,'MM/DD/YYYY') as DateField from tableName;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 19:22:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423658#M701270</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-09-19T19:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date field contains values in different formats ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423659#M701271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(IsNull(Date(Date#(FieldName,'YYYY-MM-DD'))),if(IsNull(Date(Date#(FieldName,'YYYY-MM-DD'))),Date(Date#(FieldName,'DD/MM/YYYY'))),Date(Date#(FieldName,'YYYY-MM-DD')))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 19:27:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423659#M701271</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-09-19T19:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date field contains values in different formats ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423660#M701272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mallikarjun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;&lt;CODE&gt;alt(date#(DateString, 'YYYY-MM-DD'), date#(DateString, 'DD-MM-YYYY'), date#(DateString, 'DD/MM/YYYY'), 'No Date Found') AS Date&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The alt() function returns the first value passed to it that is numerical, as&amp;nbsp; date in QlikView is a dual value (part of which is a number) we can use it to return the first date#() format that manages to create a true date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the first date#() function manages to interpret the string as a true date, then it will be returned, if not then it will move on to the next, and so on. If no numerical value is found, the alt() function will return the last value in the parameter list and so in this example, if it can't interpret the string using any of the given formats then it will return the string "No Date Found".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Swarup&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 19:40:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423660#M701272</guid>
      <dc:creator>swarup_malli</dc:creator>
      <dc:date>2012-09-19T19:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date field contains values in different formats ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423661#M701273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mayil, Celambarasan and Swarup for helping me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Both the above&amp;nbsp; solutions are excellent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mallikarjun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 19:58:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-field-contains-values-in-different-formats/m-p/423661#M701273</guid>
      <dc:creator />
      <dc:date>2012-09-19T19:58:19Z</dc:date>
    </item>
  </channel>
</rss>

