<?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 Date Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Problem/m-p/440894#M1161780</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;I have a date column which is from excell file where date is not in proper order like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateCol:&lt;/P&gt;&lt;P&gt;APR&lt;/P&gt;&lt;P&gt;MAY&lt;/P&gt;&lt;P&gt;1997&lt;/P&gt;&lt;P&gt;36319&lt;/P&gt;&lt;P&gt;36901&lt;/P&gt;&lt;P&gt;18/11/2000&lt;/P&gt;&lt;P&gt;36893&lt;/P&gt;&lt;P&gt;14/10/2002&lt;/P&gt;&lt;P&gt;38821&lt;/P&gt;&lt;P&gt;39850&lt;/P&gt;&lt;P&gt;20/09/2009&lt;/P&gt;&lt;P&gt;40486&lt;/P&gt;&lt;P&gt;40278&lt;/P&gt;&lt;P&gt;2003&lt;/P&gt;&lt;P&gt;2001&lt;/P&gt;&lt;P&gt;2004&lt;/P&gt;&lt;P&gt;2005&lt;/P&gt;&lt;P&gt;2006&lt;/P&gt;&lt;P&gt;2009&lt;/P&gt;&lt;P&gt;2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to create it in a proper order.&lt;/P&gt;&lt;P&gt;Please help for this it is urgent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ritul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Nov 2012 12:54:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-16T12:54:44Z</dc:date>
    <item>
      <title>Date Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Problem/m-p/440894#M1161780</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;I have a date column which is from excell file where date is not in proper order like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateCol:&lt;/P&gt;&lt;P&gt;APR&lt;/P&gt;&lt;P&gt;MAY&lt;/P&gt;&lt;P&gt;1997&lt;/P&gt;&lt;P&gt;36319&lt;/P&gt;&lt;P&gt;36901&lt;/P&gt;&lt;P&gt;18/11/2000&lt;/P&gt;&lt;P&gt;36893&lt;/P&gt;&lt;P&gt;14/10/2002&lt;/P&gt;&lt;P&gt;38821&lt;/P&gt;&lt;P&gt;39850&lt;/P&gt;&lt;P&gt;20/09/2009&lt;/P&gt;&lt;P&gt;40486&lt;/P&gt;&lt;P&gt;40278&lt;/P&gt;&lt;P&gt;2003&lt;/P&gt;&lt;P&gt;2001&lt;/P&gt;&lt;P&gt;2004&lt;/P&gt;&lt;P&gt;2005&lt;/P&gt;&lt;P&gt;2006&lt;/P&gt;&lt;P&gt;2009&lt;/P&gt;&lt;P&gt;2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to create it in a proper order.&lt;/P&gt;&lt;P&gt;Please help for this it is urgent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ritul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 12:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Problem/m-p/440894#M1161780</guid>
      <dc:creator />
      <dc:date>2012-11-16T12:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Problem/m-p/440895#M1161781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to create a solution using alt() function with some possible date interpretation functions.&lt;/P&gt;&lt;P&gt;You'll need to decide how to handle year numbers and months names, what date do you want to assign to these?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A solution could look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set DateFormat = 'DD/MM/YYYY';&lt;/P&gt;&lt;P&gt;SET MonthNames='jan;feb;mar;apr;may;jun;jul;aug;sep;oct;nov;dec';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *, alt(if(IsText(DateCol),Date(Date#(DateCol,'MMM')), if(DateCol &amp;lt; 2200,MakeDate(DateCol),Date(DateCol)))) as NewDate INLINE [&lt;/P&gt;&lt;P&gt;DateCol&lt;/P&gt;&lt;P&gt;APR&lt;/P&gt;&lt;P&gt;MAY&lt;/P&gt;&lt;P&gt;1997&lt;/P&gt;&lt;P&gt;36319&lt;/P&gt;&lt;P&gt;36901&lt;/P&gt;&lt;P&gt;18/11/2000&lt;/P&gt;&lt;P&gt;36893&lt;/P&gt;&lt;P&gt;14/10/2002&lt;/P&gt;&lt;P&gt;38821&lt;/P&gt;&lt;P&gt;39850&lt;/P&gt;&lt;P&gt;20/09/2009&lt;/P&gt;&lt;P&gt;40486&lt;/P&gt;&lt;P&gt;40278&lt;/P&gt;&lt;P&gt;2003&lt;/P&gt;&lt;P&gt;2001&lt;/P&gt;&lt;P&gt;2004&lt;/P&gt;&lt;P&gt;2005&lt;/P&gt;&lt;P&gt;2006&lt;/P&gt;&lt;P&gt;2009&lt;/P&gt;&lt;P&gt;2010&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 13:21:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Problem/m-p/440895#M1161781</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-16T13:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Problem/m-p/440896#M1161782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: left; color: #737373; text-indent: 0px; background-color: #ffffff;"&gt;Thanks, I have one question also what is the meaning of&lt;SPAN class="Apple-converted-space"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #737373; font-family: Arial; font-size: 13px; background-color: #ffffff;"&gt;if(DateCol &amp;lt; 2200,MakeDate(DateCol),Date(DateCol) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #737373; text-indent: 0px; background-color: #ffffff;"&gt;please explain it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #737373; text-indent: 0px; background-color: #ffffff;"&gt;Thanks,&lt;/P&gt;&lt;P style="text-align: left; color: #737373; text-indent: 0px; background-color: #ffffff;"&gt;Ritul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 13:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Problem/m-p/440896#M1161782</guid>
      <dc:creator />
      <dc:date>2012-11-16T13:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Problem/m-p/440897#M1161783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just noticed, that you don't really need the alt() function here, reason being that you need to check the numeric value in a condition anyway:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(IsText(DateCol),Date(Date#(DateCol,'MMM')), if(DateCol &amp;lt; 2200,MakeDate(DateCol),Date(DateCol))) as DateColNew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #737373; text-indent: 0px; background-color: #ffffff;"&gt;Thanks, I have one question also what is the meaning of&lt;SPAN class="Apple-converted-space"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #737373; font-family: Arial; font-size: 13px; background-color: #ffffff;"&gt;if(DateCol &amp;lt; 2200,MakeDate(DateCol),Date(DateCol) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #737373; text-indent: 0px; background-color: #ffffff;"&gt;please explain it.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your numeric value is smaller than 2200, I assume it's describing a year (first argument to makedate() function), if it's larger than 2200, it's a date in numeric representation, so we just need to format the text representation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 13:42:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Problem/m-p/440897#M1161783</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-16T13:42:34Z</dc:date>
    </item>
  </channel>
</rss>

