<?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: SQL TRUNC style function in Qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530942#M198448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Otherwise, if you are looking to keep the date while eliminating the seconds, your could either use the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Floor(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TIMEFIELD&lt;/SPAN&gt;) + Hour(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TIMEFIELD&lt;/SPAN&gt;)/24 + Minute(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TIMEFIELD&lt;/SPAN&gt;)/(24*60), 'YYYY-MM-DD hh:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Floor(TIMEFIELD, 1/(24*60)), 'YYYY-MM-DD hh:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a possibility to define the base for the floor fonction, so if to define the base to 1/(24*60), it shall truncate the seconds. In the same manner, using the 1/24 base shall truncate your dates to the hours, and going for 1/(24*60*60) will eliminate the milliseconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Aug 2013 13:54:45 GMT</pubDate>
    <dc:creator>pgrenier</dc:creator>
    <dc:date>2013-08-26T13:54:45Z</dc:date>
    <item>
      <title>SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530935#M198441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks, I am looking for SQL TRUNC style function to truncate the time stamp values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530935#M198441</guid>
      <dc:creator />
      <dc:date>2013-08-26T13:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530936#M198442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;floor() ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530936#M198442</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2013-08-26T13:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530937#M198443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dathu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use Yearstart function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;yearstart ( '2001-10-19' )&lt;/SPAN&gt; returns '2001-01-01'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;yearstart ( '2001-10-19', -1 )&lt;/SPAN&gt; returns '2000-01-01'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;yearstart ( '2001-10-19', 0, 4 )&lt;/SPAN&gt; returns '2001-04-01' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Rajesh Vaswani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:18:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530937#M198443</guid>
      <dc:creator>rajeshvaswani77</dc:creator>
      <dc:date>2013-08-26T13:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530938#M198444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like TRUNC with different formats (YEAR, Q, MONTH....), you won't get all in one in QV, but you can try separately,&lt;/P&gt;&lt;P&gt;YearStart(), MonthStart(), WeekStart() functions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:18:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530938#M198444</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-08-26T13:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530939#M198445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning Dathu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would invite you to use two functions together Date() and Floor(). Using Floor() on a date will truncate the hours, minutes, seconds and miliseconds from the date, but will also convert it to a numerical value. Hence, the need for wrapping it with the Date() function to bring it back to a date format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Date(Floor(TIMESTAMP_FIELD)) as Date_Field&lt;/P&gt;&lt;P&gt;From ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:32:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530939#M198445</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-08-26T13:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530940#M198446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reply's. But specifically looking how to truncate the timestamp value to hours and minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRUNC(TIMEFIELD,'HH24')&amp;nbsp; and TRUNC (TIMEFIELD,'MI') &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530940#M198446</guid>
      <dc:creator />
      <dc:date>2013-08-26T13:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530941#M198447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Timestamp(TIMEFIELD, 'hh')&amp;nbsp; , and&lt;/P&gt;&lt;P&gt;Timestamp(TIMEFIELD, 'mm')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:41:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530941#M198447</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-08-26T13:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530942#M198448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Otherwise, if you are looking to keep the date while eliminating the seconds, your could either use the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Floor(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TIMEFIELD&lt;/SPAN&gt;) + Hour(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TIMEFIELD&lt;/SPAN&gt;)/24 + Minute(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TIMEFIELD&lt;/SPAN&gt;)/(24*60), 'YYYY-MM-DD hh:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Floor(TIMEFIELD, 1/(24*60)), 'YYYY-MM-DD hh:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a possibility to define the base for the floor fonction, so if to define the base to 1/(24*60), it shall truncate the seconds. In the same manner, using the 1/24 base shall truncate your dates to the hours, and going for 1/(24*60*60) will eliminate the milliseconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:54:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530942#M198448</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-08-26T13:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530943#M198449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this one in script level. But this will give full timestamp whenever I can use the Timestamp function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I used this one : Timestamp#(text(timestamp(TIMEFIELD,'MM/DD/YYYY h:mm')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it kills the time because I am working on very lagre dataset like 16M rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530943#M198449</guid>
      <dc:creator />
      <dc:date>2013-08-26T13:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TRUNC style function in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530944#M198450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try : &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hour(TIMEFIELD)&amp;nbsp; , and Minute(TIMEFIELD)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 14:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-TRUNC-style-function-in-Qlikview/m-p/530944#M198450</guid>
      <dc:creator>orital81</dc:creator>
      <dc:date>2013-08-26T14:01:48Z</dc:date>
    </item>
  </channel>
</rss>

