<?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 Decimal time in whole seconds... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Decimal-time-in-whole-seconds/m-p/1333248#M411638</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With date/time fields, the approach is to break them up using something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(dateandtime) for the date&lt;/P&gt;&lt;P&gt;frac(dateandtime) for the time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because for 10 years of transactions, there could be 315,000,000 distinct values for each date/time - wowzers batman!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the time is hours, minutes, seconds this solution will work but sometimes the field may include fractional seconds because internally the date/time is just a decimal number (date is offset from a base - usually 1/1900 and the time is simply seconds/86400).&amp;nbsp; If you don't need the fractional part of the time there is any easy way to get rid of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1/86400 is approximately 0.000012 so you only need 6 decimal places for any second of the day.&amp;nbsp; When breaking up the time use the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FLOOR(FRAC(dateandtime)*86400)/86400&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All it does it remove all the "junk" beyond the 6th decimal place and round to the nearest second.&amp;nbsp; It will likely get your distinct values down considerably.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Apr 2017 21:27:16 GMT</pubDate>
    <dc:creator>markp201</dc:creator>
    <dc:date>2017-04-27T21:27:16Z</dc:date>
    <item>
      <title>Decimal time in whole seconds...</title>
      <link>https://community.qlik.com/t5/QlikView/Decimal-time-in-whole-seconds/m-p/1333248#M411638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With date/time fields, the approach is to break them up using something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(dateandtime) for the date&lt;/P&gt;&lt;P&gt;frac(dateandtime) for the time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because for 10 years of transactions, there could be 315,000,000 distinct values for each date/time - wowzers batman!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the time is hours, minutes, seconds this solution will work but sometimes the field may include fractional seconds because internally the date/time is just a decimal number (date is offset from a base - usually 1/1900 and the time is simply seconds/86400).&amp;nbsp; If you don't need the fractional part of the time there is any easy way to get rid of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1/86400 is approximately 0.000012 so you only need 6 decimal places for any second of the day.&amp;nbsp; When breaking up the time use the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FLOOR(FRAC(dateandtime)*86400)/86400&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All it does it remove all the "junk" beyond the 6th decimal place and round to the nearest second.&amp;nbsp; It will likely get your distinct values down considerably.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 21:27:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decimal-time-in-whole-seconds/m-p/1333248#M411638</guid>
      <dc:creator>markp201</dc:creator>
      <dc:date>2017-04-27T21:27:16Z</dc:date>
    </item>
  </channel>
</rss>

