<?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 A simple question about number formatting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/A-simple-question-about-number-formatting/m-p/235575#M86831</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, I don't think QlikView can handle escape characters like that. Instead, you need to build it up bit by bit. Like this, for instance (untested):&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;timestamp(MyField,'d') &amp;amp; ' days '&lt;BR /&gt;&amp;amp; timestamp(MyField,'h') &amp;amp; ' hours '&lt;BR /&gt;&amp;amp; timestamp(MyField,'m') &amp;amp; ' mins'&lt;/P&gt;&lt;P&gt;And if you need to preserve the underlying numeric value, such as for sorting, you can use a dual():&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;dual(timestamp(MyField,'d') &amp;amp; ' days '&lt;BR /&gt; &amp;amp; timestamp(MyField,'h') &amp;amp; ' hours '&lt;BR /&gt; &amp;amp; timestamp(MyField,'m') &amp;amp; ' mins'&lt;BR /&gt; ,MyField)&lt;/P&gt;&lt;P&gt;It's not ideal, but I think it's all we have. (Edit: Well, not all we have. Plenty of other ugly ways to do it. Just no clean way to do it that I'm aware of.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Oct 2010 23:26:30 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-10-12T23:26:30Z</dc:date>
    <item>
      <title>A simple question about number formatting</title>
      <link>https://community.qlik.com/t5/QlikView/A-simple-question-about-number-formatting/m-p/235574#M86830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to output the format of a table column to, eg. 8 days 3 hours 21 mins&lt;/P&gt;&lt;P&gt;In the Number Format box on the Properties &amp;gt;&amp;gt; Number tab, every time I type d, this displays the day.&lt;/P&gt;&lt;P&gt;In an Excel cell, it can be done by escaping reserved characters (e.g. you could use something like d \da\y\s to display '8 days' (because d, y and s, without the \ would display days, years, seconds, respectively).&lt;/P&gt;&lt;P&gt;Can formatting such as this be done in QV? It is easy to create customised formatting using non-reserved characters (e.g you can enter 'd bar' to output the value 8 as '8 bar'). Hope I'm making sense.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Oct 2010 21:51:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-simple-question-about-number-formatting/m-p/235574#M86830</guid>
      <dc:creator />
      <dc:date>2010-10-12T21:51:29Z</dc:date>
    </item>
    <item>
      <title>A simple question about number formatting</title>
      <link>https://community.qlik.com/t5/QlikView/A-simple-question-about-number-formatting/m-p/235575#M86831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, I don't think QlikView can handle escape characters like that. Instead, you need to build it up bit by bit. Like this, for instance (untested):&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;timestamp(MyField,'d') &amp;amp; ' days '&lt;BR /&gt;&amp;amp; timestamp(MyField,'h') &amp;amp; ' hours '&lt;BR /&gt;&amp;amp; timestamp(MyField,'m') &amp;amp; ' mins'&lt;/P&gt;&lt;P&gt;And if you need to preserve the underlying numeric value, such as for sorting, you can use a dual():&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;dual(timestamp(MyField,'d') &amp;amp; ' days '&lt;BR /&gt; &amp;amp; timestamp(MyField,'h') &amp;amp; ' hours '&lt;BR /&gt; &amp;amp; timestamp(MyField,'m') &amp;amp; ' mins'&lt;BR /&gt; ,MyField)&lt;/P&gt;&lt;P&gt;It's not ideal, but I think it's all we have. (Edit: Well, not all we have. Plenty of other ugly ways to do it. Just no clean way to do it that I'm aware of.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Oct 2010 23:26:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-simple-question-about-number-formatting/m-p/235575#M86831</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-10-12T23:26:30Z</dc:date>
    </item>
    <item>
      <title>A simple question about number formatting</title>
      <link>https://community.qlik.com/t5/QlikView/A-simple-question-about-number-formatting/m-p/235576#M86832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is spot on John. Thank you very much!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 09:11:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-simple-question-about-number-formatting/m-p/235576#M86832</guid>
      <dc:creator />
      <dc:date>2010-10-13T09:11:21Z</dc:date>
    </item>
  </channel>
</rss>

