<?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 turning text into date in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/turning-text-into-date-in-script/m-p/180816#M713844</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use the timestamp# transformation in combination with date(). So something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;date(timestamp#(datefield,'MM/DD/YYYY hh:mm')) as Date&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;if(left(datefield,5)='/',&lt;BR /&gt; date(timestamp#(datefield,'YYYY/MM/DD hh:mm')),&lt;BR /&gt; date(timestamp#(datefield,'MM/DD/YYYY hh:mm'))&lt;BR /&gt;) as Date&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Aug 2010 23:23:07 GMT</pubDate>
    <dc:creator>vgutkovsky</dc:creator>
    <dc:date>2010-08-30T23:23:07Z</dc:date>
    <item>
      <title>turning text into date in script</title>
      <link>https://community.qlik.com/t5/QlikView/turning-text-into-date-in-script/m-p/180815#M713843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a couple tables where the dates in the older files come thru as text&lt;/P&gt;&lt;P&gt;2007/12/01 00:00:00&lt;/P&gt;&lt;P&gt;1/12/2007 00:00&lt;/P&gt;&lt;P&gt;I want to convert these to dates in the script, is this possible? Qlikview does not recognize them as dates even if I use teh date() function. I tried teh below but I get Error in expression ')' expected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;BR /&gt; (mid(Date,5) = '/' ,&lt;BR /&gt;&lt;BR /&gt; left(Date,4) &amp;amp; '/' &amp;amp; mid(Date,6,2) &amp;amp; '/' &amp;amp; mid(Date,9,2,) as Date,&lt;BR /&gt;&lt;BR /&gt; Date as Date),&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 23:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/turning-text-into-date-in-script/m-p/180815#M713843</guid>
      <dc:creator />
      <dc:date>2010-08-30T23:16:44Z</dc:date>
    </item>
    <item>
      <title>turning text into date in script</title>
      <link>https://community.qlik.com/t5/QlikView/turning-text-into-date-in-script/m-p/180816#M713844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use the timestamp# transformation in combination with date(). So something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;date(timestamp#(datefield,'MM/DD/YYYY hh:mm')) as Date&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;if(left(datefield,5)='/',&lt;BR /&gt; date(timestamp#(datefield,'YYYY/MM/DD hh:mm')),&lt;BR /&gt; date(timestamp#(datefield,'MM/DD/YYYY hh:mm'))&lt;BR /&gt;) as Date&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 23:23:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/turning-text-into-date-in-script/m-p/180816#M713844</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-08-30T23:23:07Z</dc:date>
    </item>
    <item>
      <title>turning text into date in script</title>
      <link>https://community.qlik.com/t5/QlikView/turning-text-into-date-in-script/m-p/180817#M713845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look up functions date#() and date() in the Help Section - the first function is casting string into a date, and the second one formats the date to a desired date format.&lt;/P&gt;&lt;P&gt;Generally speaking, QlikView Help Section is organized fairly logically - if you need "Date Functions", search for the string and you'll typically find what you need...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 23:27:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/turning-text-into-date-in-script/m-p/180817#M713845</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2010-08-30T23:27:13Z</dc:date>
    </item>
  </channel>
</rss>

