<?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: Duration Between Two Dates/Times in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Duration-Between-Two-Dates-Times/m-p/1813053#M66362</link>
    <description>&lt;P&gt;Solved it.&amp;nbsp; Hope this helps!&amp;nbsp; A little bit of additional date/time formatting required based on the source system data fields.&amp;nbsp; The stumbling block was the format on the time fields to take the A or P into consideration --&amp;gt; time(Time#([TFATME],'hhmm&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;t&lt;/STRONG&gt;&lt;/FONT&gt;'),'hh:mm&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; tt&lt;/STRONG&gt;&lt;/FONT&gt;')&lt;/P&gt;&lt;P&gt;, interval(Timestamp(Date(Date#(TFADTE, 'YYYYMMDD'), 'MM/DD/YYYY') + time(Time#([TFATME],'hhmmt'),'hh:mm tt'), 'MM-DD-YYYY hh:mm tt') - Timestamp(Date(Date#(TFDDTE, 'YYYYMMDD'), 'MM/DD/YYYY') + time(Time#([TFDTME],'hhmmt'),'hh:mm tt'), 'MM-DD-YYYY hh:mm tt'),'hh:mm') as "Flight Duration"&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jun 2021 15:49:56 GMT</pubDate>
    <dc:creator>carlcimino</dc:creator>
    <dc:date>2021-06-04T15:49:56Z</dc:date>
    <item>
      <title>Duration Between Two Dates/Times</title>
      <link>https://community.qlik.com/t5/App-Development/Duration-Between-Two-Dates-Times/m-p/1813031#M66359</link>
      <description>&lt;P&gt;Hello, I am trying to calculate the time (in minutes) between a flight departure and a flight arrival.&amp;nbsp; I know I have to merge the dates and time fields.&amp;nbsp; However I'm unsure how to convert the time field to an actual time because of the A or P appended onto the end to designate AM or PM.&amp;nbsp; &amp;nbsp;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Here is some sample data:&lt;/P&gt;&lt;P&gt;FlightDateTimeDuration:&lt;BR /&gt;load * inline [&lt;BR /&gt;FLIGHT DEP DATE,FLIGHT DEP TIME,FLIGHT ARRIVAL DATE,FLIGHT ARRIVAL TIME&lt;BR /&gt;05/24/2021,0100P,05/24/2021,0235P&lt;BR /&gt;04/22/2020,0105P,04/22/2020,0420P&lt;BR /&gt;05/26/2021,0115P,05/26/2021,0325P&lt;BR /&gt;06/09/2021,0115P,06/09/2021,0232P&lt;BR /&gt;03/20/2020,0120P,03/20/2020,0255P&lt;BR /&gt;10/03/2021,0130P,10/03/2021,0324P&lt;BR /&gt;05/20/2021,0137P,05/20/2021,0350P&lt;BR /&gt;06/17/2021,0157P,06/17/2021,0305P&lt;BR /&gt;05/19/2021,0200P,05/19/2021,0340P&lt;BR /&gt;05/28/2021,0200P,05/28/2021,0325P&lt;BR /&gt;06/02/2021,0200P,06/02/2021,0305P&lt;BR /&gt;05/27/2021,0213P,05/27/2021,0355P&lt;BR /&gt;06/11/2021,0213P,06/11/2021,0329P&lt;BR /&gt;05/28/2021,0220P,05/28/2021,0430P&lt;BR /&gt;05/26/2021,0230P,05/26/2021,0405P&lt;BR /&gt;05/19/2021,0233P,05/19/2021,0438P&lt;BR /&gt;05/28/2021,0235P,05/28/2021,0435P&lt;BR /&gt;05/27/2021,0240P,05/27/2021,0725P&lt;BR /&gt;06/14/2021,0243P,06/14/2021,0552P&lt;BR /&gt;06/05/2021,0245P,06/05/2021,0431P&lt;BR /&gt;05/26/2021,0249P,05/26/2021,0535P&lt;BR /&gt;06/18/2021,0255P,06/18/2021,0439P&lt;BR /&gt;05/24/2021,0300P,05/24/2021,0445P&lt;BR /&gt;]&lt;BR /&gt;;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 14:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Duration-Between-Two-Dates-Times/m-p/1813031#M66359</guid>
      <dc:creator>carlcimino</dc:creator>
      <dc:date>2021-06-04T14:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Between Two Dates/Times</title>
      <link>https://community.qlik.com/t5/App-Development/Duration-Between-Two-Dates-Times/m-p/1813044#M66361</link>
      <description>&lt;P&gt;Finding pieces of this all over the place but still not there yet.&amp;nbsp; The A or P on the end of the departure and arrival time is still giving fits...&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Time-format-including-AM-PM/m-p/297757#M110467" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Dev/Time-format-including-AM-PM/m-p/297757#M110467&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/App-Development/Caluculate-the-time-diff-bn-two-time-stamps/td-p/1518286" target="_blank"&gt;https://community.qlik.com/t5/App-Development/Caluculate-the-time-diff-bn-two-time-stamps/td-p/1518286&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Combine-Date-and-Time-Fields-as-a-single-field-quot-TimeStamp/m-p/552899#M206593" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Dev/Combine-Date-and-Time-Fields-as-a-single-field-quot-TimeStamp/m-p/552899#M206593&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 15:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Duration-Between-Two-Dates-Times/m-p/1813044#M66361</guid>
      <dc:creator>carlcimino</dc:creator>
      <dc:date>2021-06-04T15:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Between Two Dates/Times</title>
      <link>https://community.qlik.com/t5/App-Development/Duration-Between-Two-Dates-Times/m-p/1813053#M66362</link>
      <description>&lt;P&gt;Solved it.&amp;nbsp; Hope this helps!&amp;nbsp; A little bit of additional date/time formatting required based on the source system data fields.&amp;nbsp; The stumbling block was the format on the time fields to take the A or P into consideration --&amp;gt; time(Time#([TFATME],'hhmm&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;t&lt;/STRONG&gt;&lt;/FONT&gt;'),'hh:mm&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; tt&lt;/STRONG&gt;&lt;/FONT&gt;')&lt;/P&gt;&lt;P&gt;, interval(Timestamp(Date(Date#(TFADTE, 'YYYYMMDD'), 'MM/DD/YYYY') + time(Time#([TFATME],'hhmmt'),'hh:mm tt'), 'MM-DD-YYYY hh:mm tt') - Timestamp(Date(Date#(TFDDTE, 'YYYYMMDD'), 'MM/DD/YYYY') + time(Time#([TFDTME],'hhmmt'),'hh:mm tt'), 'MM-DD-YYYY hh:mm tt'),'hh:mm') as "Flight Duration"&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 15:49:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Duration-Between-Two-Dates-Times/m-p/1813053#M66362</guid>
      <dc:creator>carlcimino</dc:creator>
      <dc:date>2021-06-04T15:49:56Z</dc:date>
    </item>
  </channel>
</rss>

