<?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 Variable interpretation and foreign language settings (decimal/thousand sep.) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-interpretation-and-foreign-language-settings-decimal/m-p/228205#M80261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking for a way to store a decimal number into a variable under German language settings so that the variable can be used in a function expecting a numerical/decimal argument later. The catch with German language settings is that the decimal separator is ',' (thousand separator is '.'). QlikView seems to mix up function arguments separator and decimal separator.&lt;/P&gt;&lt;P&gt;Example 1 (English language settings, works):&lt;BR /&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET TimestampFormat='MM/DD/YYYY hh:mm:ss[.fff]';&lt;BR /&gt;LET varNow = Now();&lt;BR /&gt;LET varTimestamp = Timestamp($(#varNow));&lt;BR /&gt;TRACE varTimestamp $(varTimestamp);&lt;BR /&gt;TRACE #varTimestamp $(#varTimestamp);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Output:&lt;BR /&gt;varNow: 07/20/2010 16:35:37&lt;BR /&gt;#varNow: 40379.691400463&lt;BR /&gt;varTimestamp 07/20/2010 16:35:37&lt;BR /&gt;#varTimestamp 40379.691400463&lt;/P&gt;&lt;P&gt;Example 2 (German launguage settings, does not work):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;SET ThousandSep='.';&lt;BR /&gt;SET DecimalSep=',';&lt;BR /&gt;SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]';&lt;BR /&gt;LET varNow = Now();&lt;BR /&gt;LET varTimestamp = Timestamp($(#varNow));&lt;BR /&gt;TRACE varTimestamp $(varTimestamp);&lt;BR /&gt;TRACE #varTimestamp $(#varTimestamp);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;varNow: 20.07.2010 16:47:33&lt;BR /&gt;#varNow: 40379,6996875&lt;BR /&gt;varTimestamp 6996875&lt;BR /&gt;#varTimestamp 40379&lt;BR /&gt;&lt;BR /&gt;The problem seems to be that $(#varNow) resolves to 40379,6996875 instead of 40379.6996875. I tried to do a Replace($(#varNow), ',', '.'), which - apart from being ugly - did not work either on account of the ',' in the decimal string being interpreted as function argument separator again.&lt;/P&gt;&lt;P&gt;Could someone please point me to the obvious solution I failed to see? Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jul 2010 16:01:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-20T16:01:30Z</dc:date>
    <item>
      <title>Variable interpretation and foreign language settings (decimal/thousand sep.)</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpretation-and-foreign-language-settings-decimal/m-p/228205#M80261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking for a way to store a decimal number into a variable under German language settings so that the variable can be used in a function expecting a numerical/decimal argument later. The catch with German language settings is that the decimal separator is ',' (thousand separator is '.'). QlikView seems to mix up function arguments separator and decimal separator.&lt;/P&gt;&lt;P&gt;Example 1 (English language settings, works):&lt;BR /&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET TimestampFormat='MM/DD/YYYY hh:mm:ss[.fff]';&lt;BR /&gt;LET varNow = Now();&lt;BR /&gt;LET varTimestamp = Timestamp($(#varNow));&lt;BR /&gt;TRACE varTimestamp $(varTimestamp);&lt;BR /&gt;TRACE #varTimestamp $(#varTimestamp);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Output:&lt;BR /&gt;varNow: 07/20/2010 16:35:37&lt;BR /&gt;#varNow: 40379.691400463&lt;BR /&gt;varTimestamp 07/20/2010 16:35:37&lt;BR /&gt;#varTimestamp 40379.691400463&lt;/P&gt;&lt;P&gt;Example 2 (German launguage settings, does not work):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;SET ThousandSep='.';&lt;BR /&gt;SET DecimalSep=',';&lt;BR /&gt;SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]';&lt;BR /&gt;LET varNow = Now();&lt;BR /&gt;LET varTimestamp = Timestamp($(#varNow));&lt;BR /&gt;TRACE varTimestamp $(varTimestamp);&lt;BR /&gt;TRACE #varTimestamp $(#varTimestamp);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;varNow: 20.07.2010 16:47:33&lt;BR /&gt;#varNow: 40379,6996875&lt;BR /&gt;varTimestamp 6996875&lt;BR /&gt;#varTimestamp 40379&lt;BR /&gt;&lt;BR /&gt;The problem seems to be that $(#varNow) resolves to 40379,6996875 instead of 40379.6996875. I tried to do a Replace($(#varNow), ',', '.'), which - apart from being ugly - did not work either on account of the ',' in the decimal string being interpreted as function argument separator again.&lt;/P&gt;&lt;P&gt;Could someone please point me to the obvious solution I failed to see? Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 16:01:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpretation-and-foreign-language-settings-decimal/m-p/228205#M80261</guid>
      <dc:creator />
      <dc:date>2010-07-20T16:01:30Z</dc:date>
    </item>
    <item>
      <title>Variable interpretation and foreign language settings (decimal/thousand sep.)</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpretation-and-foreign-language-settings-decimal/m-p/228206#M80262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just accidentally found out that apparently you can call variables directly by name in the script, i.e. just "varFoo" instead of "$(varFoo)" or "$(#varFoo)". That seems to circumvent the separator-changing business.&lt;/P&gt;&lt;P&gt;I also thought that the problem in my example in the above post might be that Now() gives a type dual variable. Therefore I reproduced a much easier example from the manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;SET DecimalSep = ',';&lt;BR /&gt;LET var = 7 / 2;&lt;BR /&gt;TRACE $(var);&lt;BR /&gt;TRACE $(#var);&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The manual states that in this case $(var) should resolve to '3,5', whereas $(#var) should resolve to '3.5'. Yet I get:&lt;/P&gt;&lt;P&gt;3,5&lt;BR /&gt;3,5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 16:54:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpretation-and-foreign-language-settings-decimal/m-p/228206#M80262</guid>
      <dc:creator />
      <dc:date>2010-07-20T16:54:22Z</dc:date>
    </item>
  </channel>
</rss>

