<?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 Timestamp on Select in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Convert-String-to-Timestamp-on-Select/m-p/1826744#M68002</link>
    <description>Hi,&lt;BR /&gt;Qlik holds timestamps as decimals so for example the num(now( )) function would return 44411.327511574 but displays as 2021-08-03 07:55:18. This is important for your comparison operator "&amp;gt;" so changing it to text means the operator won't work properly.&lt;BR /&gt;If it's the [time] column that is in the wrong format and it's not reading correctly then you can format it in the 'where' statement by wrapping it in a Timestamp#( ) function. If it's in the format written above then you'd write it as:&lt;BR /&gt;timestamp#([time],'D/M/YYYY, hh:mm:ss tt').&lt;BR /&gt;I noticed there's a comma in the format and I'm not sure how the timestamp is going to deal with that but give it a try.&lt;BR /&gt;I hope this helps&lt;BR /&gt;Regards&lt;BR /&gt;Anthony</description>
    <pubDate>Wed, 04 Aug 2021 22:04:13 GMT</pubDate>
    <dc:creator>anthonyj</dc:creator>
    <dc:date>2021-08-04T22:04:13Z</dc:date>
    <item>
      <title>Convert String to Timestamp on Select</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-String-to-Timestamp-on-Select/m-p/1826712#M67996</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I need to load a table which has a time stamp that doesn't match how the it should be formatted.&lt;/P&gt;&lt;P&gt;Also, I want to be able to limit how many days back I load.&lt;/P&gt;&lt;P&gt;This is how the "date" looks like on the MongoDB:&lt;/P&gt;&lt;P&gt;3/1/2020, 12:00:03 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the code:&lt;/P&gt;&lt;P&gt;Let vEndDate = text(date((Today()-2), 'YYYY-MM-DD hh:mm:ss'));&lt;/P&gt;&lt;P&gt;LOAD _id,&lt;BR /&gt;if([value] &amp;gt; 0.0,[value]) as bat%,&lt;BR /&gt;agv as batAGV,&lt;BR /&gt;[time] as batTimestamp,&lt;BR /&gt;loop as batLoop;&lt;/P&gt;&lt;P&gt;[agvBatteryLevel]:&lt;BR /&gt;SELECT [_id],&lt;BR /&gt;[value],&lt;BR /&gt;agv,&lt;BR /&gt;[time],&lt;BR /&gt;loop&lt;BR /&gt;FROM faults.agvBatteryLevel WHERE ( [time] &amp;gt; '$(vEndDate)' );;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 17:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-String-to-Timestamp-on-Select/m-p/1826712#M67996</guid>
      <dc:creator>RobertoMello</dc:creator>
      <dc:date>2021-08-04T17:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Timestamp on Select</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-String-to-Timestamp-on-Select/m-p/1826744#M68002</link>
      <description>Hi,&lt;BR /&gt;Qlik holds timestamps as decimals so for example the num(now( )) function would return 44411.327511574 but displays as 2021-08-03 07:55:18. This is important for your comparison operator "&amp;gt;" so changing it to text means the operator won't work properly.&lt;BR /&gt;If it's the [time] column that is in the wrong format and it's not reading correctly then you can format it in the 'where' statement by wrapping it in a Timestamp#( ) function. If it's in the format written above then you'd write it as:&lt;BR /&gt;timestamp#([time],'D/M/YYYY, hh:mm:ss tt').&lt;BR /&gt;I noticed there's a comma in the format and I'm not sure how the timestamp is going to deal with that but give it a try.&lt;BR /&gt;I hope this helps&lt;BR /&gt;Regards&lt;BR /&gt;Anthony</description>
      <pubDate>Wed, 04 Aug 2021 22:04:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-String-to-Timestamp-on-Select/m-p/1826744#M68002</guid>
      <dc:creator>anthonyj</dc:creator>
      <dc:date>2021-08-04T22:04:13Z</dc:date>
    </item>
  </channel>
</rss>

