<?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: Timestamp in variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480572#M179598</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When your using let no need $,&lt;/P&gt;&lt;P&gt;When using Set you can use $&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Sep 2013 12:16:19 GMT</pubDate>
    <dc:creator>NavinReddy</dc:creator>
    <dc:date>2013-09-04T12:16:19Z</dc:date>
    <item>
      <title>Timestamp in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480569#M179595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to display something very simple on the Welcome page of my QVW : the date and time of the last reload of the application.&lt;/P&gt;&lt;P&gt;To do so, I included in the loading script some tests : &lt;/P&gt;&lt;P&gt;LET vReloadToday&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Today(0);&lt;/P&gt;&lt;P&gt;LET vReloadTime&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = LocalTime();&lt;/P&gt;&lt;P&gt;LET vReloadNow&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Now();*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I tried to display those variables in textboxes. Textboxes showed only :&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;But in the variables are the good times and dates (see images below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;It looks so simple I do not explain why Qlikview is not able to display simple time stamps. I also tried the DayName() function, but no result (well, wrong date in the textbox).&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Debug timestamp.png" class="jive-image" src="/legacyfs/online/46183_Debug timestamp.png" style="width: 620px; height: 312px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 12:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480569#M179595</guid>
      <dc:creator />
      <dc:date>2013-09-04T12:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480570#M179596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just remove the $ from in front of your expression in text box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your wrote&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =$(&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vReloadNow &lt;/EM&gt;&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;Should be&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vReloadNow &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 12:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480570#M179596</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-09-04T12:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480571#M179597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, great, it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I do not understand why. What is stored in the variable? How come that I can call a variable without using $()?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 12:13:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480571#M179597</guid>
      <dc:creator />
      <dc:date>2013-09-04T12:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480572#M179598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When your using let no need $,&lt;/P&gt;&lt;P&gt;When using Set you can use $&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 12:16:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480572#M179598</guid>
      <dc:creator>NavinReddy</dc:creator>
      <dc:date>2013-09-04T12:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480573#M179599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'$' is required when you need expansion (that means something which is itself like an expression). But in your case, the variables hold the value itself after the load. So there is nothing to expand out of a value itself. Hope, this gives you an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for better understanding, from help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;A name="kanchor568"&gt;&lt;/A&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Dollar&lt;/SPAN&gt;-Sign Expansions&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Dollar&lt;/SPAN&gt;-sign &lt;BR /&gt;expansions are definitions of text replacements used in the script or in &lt;BR /&gt;expressions. This process is known as expansion - even if the new text is &lt;BR /&gt;shorter. The replacement is made just before the script statement or the &lt;BR /&gt;expression is evaluated. Technically it is a macro expansion. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A macro expansion always begins with '$(' and ends with ') ' and the content &lt;BR /&gt;between brackets defines how the text replacement will be done. To avoid &lt;BR /&gt;confusion with script macros we will henceforth refer to macro expansions as &lt;BR /&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;dollar&lt;/SPAN&gt;-sign &lt;BR /&gt;expansions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="note"&gt;&lt;SPAN class="Bold"&gt;Note!&lt;/SPAN&gt; &lt;BR /&gt;Macro expansion is unrelated &lt;BR /&gt;to script macros (VB or Java script defined in the script module). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="note"&gt;&lt;SPAN class="Bold"&gt;Note!&lt;/SPAN&gt; &lt;BR /&gt;A &lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;dollar&lt;/SPAN&gt;-sign expansion is &lt;BR /&gt;limited in how many macro expansions it can calculate. Any expansion over 1000 &lt;BR /&gt;will not be calculated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Dollar&lt;/SPAN&gt;-Sign &lt;BR /&gt;Expansion Using a Variable&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using a variable for text replacement in the script or in an expression, &lt;BR /&gt;the following syntax is used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;$&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;( &lt;BR /&gt;variablename )&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;$&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;( variablename)&lt;/SPAN&gt; expands to &lt;BR /&gt;the value in &lt;SPAN class="Italic"&gt;variablename&lt;/SPAN&gt;. If &lt;SPAN class="Italic"&gt;variablename&lt;/SPAN&gt; does not exist the expansion will be the empty &lt;BR /&gt;string. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For numeric variable expansions, the syntax &lt;SPAN class="Bold"&gt;$&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;( variablename )&lt;/SPAN&gt; will generate a number using the regional &lt;BR /&gt;decimal separator, i.e. for many countries a decimal comma. Such an expansion &lt;BR /&gt;should not be used for numbers inside the script since these must use decimal &lt;BR /&gt;point. Instead the expansion $(# variablename ) should be used. (Note the hash &lt;BR /&gt;sign). It always yields a valid decimal-point representation of the numeric &lt;BR /&gt;value of &lt;SPAN class="Italic"&gt;variablename&lt;/SPAN&gt;, possibly with exponential &lt;BR /&gt;notation (for very large/small numbers). If &lt;SPAN class="Italic"&gt;variablename&lt;/SPAN&gt; does not exist or does not contain a numeric &lt;BR /&gt;value, it will be expanded to &lt;SPAN class="Italic"&gt;0&lt;/SPAN&gt; instead. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: italic;"&gt;After &lt;BR /&gt;execution of the following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;SET DecimalSep=',';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;LET X = 7/2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(X ) will expand to 3,5 while $(#X ) will expand &lt;BR /&gt;to 3.5. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;set Mypath=C:\MyDocs\Files\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;load * from $(MyPath)abc.csv;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;set CurrentYear=1992;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;select * from table1 where Year=$(CurrentYear);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Dollar&lt;/SPAN&gt;-Sign &lt;BR /&gt;Expansion with Parameters&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters can be used in variable expansions. The variable must then contain &lt;BR /&gt;formal parameters, such as $1, $2, $3 etc. When expanding the variable, the &lt;BR /&gt;parameters should be stated in a comma separated list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;set MUL=’$1*$2’;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL(3,7)); //&lt;/SPAN&gt; returns '3*7' in X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;let X=$(MUL(3,7)); //&lt;/SPAN&gt; returns 21 in X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the number of formal parameters exceeds the number of actual parameters &lt;BR /&gt;only the formal parameters corresponding to actual parameters will be expanded. &lt;BR /&gt;If the number of actual parameters exceeds the number of formal parameters the &lt;BR /&gt;superfluous actual parameters will be ignored. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;set MUL=’$1*$2’;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL); //&lt;/SPAN&gt; returns '$1*$2' in X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL(10)); //&lt;/SPAN&gt; returns '10*$2' in X&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;let X=$(MUL(5,7,8)); //&lt;/SPAN&gt; returns 35 in X&lt;/P&gt;&lt;P&gt;The parameter $0 returns the number of parameters actually passed by a call. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;set MUL='$1*$2 $0 par'; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL(3,7)); &lt;BR /&gt;//&lt;/SPAN&gt; returns '3*7 2 par' in X &lt;/P&gt;&lt;H2&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Dollar&lt;/SPAN&gt;-Sign &lt;BR /&gt;Expansion with an Expression&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expressions can be used in &lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;dollar&lt;/SPAN&gt;-sign expansions. &lt;BR /&gt;The content between the brackets must then start with an equal sign: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$( =expression )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression will be evaluated and the value will &lt;BR /&gt;be used in the expansion. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;$(=Year(Today())); //&lt;/SPAN&gt; returns e.g. '2008'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;$(=Only(Year)-1); //&lt;/SPAN&gt; returns the year before the &lt;BR /&gt;selected one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Dollar&lt;/SPAN&gt;-Sign &lt;BR /&gt;Expansion of File - Include Statement&lt;/H3&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File inclusions are made using &lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;dollar&lt;/SPAN&gt;-sign expansions. &lt;BR /&gt;The syntax is then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$( include=filename )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above text will be replaced by the content of &lt;BR /&gt;the file specified after the equal sign. This feature is very useful when &lt;BR /&gt;storing scripts or parts of scripts in text files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;$(include=C:\Documents\MyScript.qvs);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 12:20:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480573#M179599</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-09-04T12:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480574#M179600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Easier to understand now, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 12:41:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-variable/m-p/480574#M179600</guid>
      <dc:creator />
      <dc:date>2013-09-04T12:41:11Z</dc:date>
    </item>
  </channel>
</rss>

