<?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: Convert string to date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Convert-string-to-date/m-p/1578#M88</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike, Date#() is used to specify the input date format, ie:&lt;/P&gt;&lt;P&gt;Date#('Jan 16 2017, 8:45 am', 'MMM DD YYYY, hh:mm tt')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Date(Date#('Jan 16 2017, 8:45 am', 'MMM DD YYYY, hh:mm tt'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Num(Date#('Jan 16 2017, 8:45 am', 'MMM DD YYYY, hh:mm tt'))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jan 2018 18:22:26 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2018-01-16T18:22:26Z</dc:date>
    <item>
      <title>Convert string to date</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-string-to-date/m-p/1577#M87</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a field called observation_time with string data like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last Updated on Jan 16 2018, 8:45 am PST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to format it as a standard timestamp.&amp;nbsp; So far, I have used the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Date#(textBetween(observation_time,'Last Updated on ', 'P'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This finds the date and time information between the beginning and end of the string, so it now looks like this:&lt;/P&gt;&lt;P&gt;Jan 16 2017, 8:45 am&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although this is a step in the right direction, my next goal is to use the Max() function to get the last record of the data set.&amp;nbsp; The Max function won't work on this as it still thinks it's a string, and not a date.&amp;nbsp; I've tried wrapping it in the Date function but that results in an invalid dimension. (I'm testing functions in a table chart in Qlik Sense, but I will be using the script editor to load the data once I figure out how to convert the field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how to convert this string to a valid date format so I can then use the Max function on the field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 18:15:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-string-to-date/m-p/1577#M87</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2018-01-16T18:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to date</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-string-to-date/m-p/1578#M88</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike, Date#() is used to specify the input date format, ie:&lt;/P&gt;&lt;P&gt;Date#('Jan 16 2017, 8:45 am', 'MMM DD YYYY, hh:mm tt')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Date(Date#('Jan 16 2017, 8:45 am', 'MMM DD YYYY, hh:mm tt'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Num(Date#('Jan 16 2017, 8:45 am', 'MMM DD YYYY, hh:mm tt'))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 18:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-string-to-date/m-p/1578#M88</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-01-16T18:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to date</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-string-to-date/m-p/1579#M89</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That got me going in the right direction, the following is giving me the result that I want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=timestamp(Date#(textBetween(observation_time,'Last Updated on ', 'P'),'MMM DD YYYY, hh:mm tt'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 18:39:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-string-to-date/m-p/1579#M89</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2018-01-16T18:39:21Z</dc:date>
    </item>
  </channel>
</rss>

