<?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: Script help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091709#M636209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;LET vLoadFrom = TimeStamp(If(Num(WeekDay($(vLAST_LOAD_TIME))) &amp;gt;= 6 or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Num(WeekDay($(vLAST_LOAD_TIME))) = 0&lt;/SPAN&gt;, WeekStart($(vLAST_LOAD_TIME)), $(vLAST_LOAD_TIME)), '&lt;SPAN style="color: #ff0000;"&gt;DD.MM.YYYY HH24:MI:SS&lt;/SPAN&gt;');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The one last thing that concerns me is the this date format -&amp;gt; &lt;STRONG style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DD.MM.YYYY HH24:MI:SS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I don't think QlikView will recognize this, may be you want this -&amp;gt; &lt;STRONG style="color: #ff0000;"&gt;DD/MM/YYYY hh:mm:ss&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LET vLoadFrom = TimeStamp(If(Num(WeekDay($(vLAST_LOAD_TIME))) &amp;gt;= 6 or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Num(WeekDay($(vLAST_LOAD_TIME))) = 0&lt;/SPAN&gt;, WeekStart($(vLAST_LOAD_TIME)), $(vLAST_LOAD_TIME)), '&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;DD/MM/YYYY hh:mm:ss&lt;/STRONG&gt;');&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Apr 2016 12:34:39 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-04-11T12:34:39Z</dc:date>
    <item>
      <title>Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091691#M636185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having one table called "STICHPROBE" , so normally we are running script below for QVD generator to load data every 2 hours from Database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose script started running every Monday than Tuesday...Wed...Thus... But on Friday What I'm looking is to load data once again from Monday . So on every Friday's of the Month we gonna load data once again from Monday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So could u please help how this can be handled by using below script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************Script Start***********************************************************&lt;/P&gt;&lt;P&gt;LET vStartDate = date(makedate(2015,1), 'DD.MM.YYYY hh:mm:ss');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vQVD = 'D:\qvprod\QV_QVD';&lt;/P&gt;&lt;P&gt;Let vQVDCurrentYear = 'D:\qvprod\QV_QVD\'&amp;amp; year(today());&lt;/P&gt;&lt;P&gt;$(Include=.....\0_db_connections.qvs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vStart = now();&lt;/P&gt;&lt;P&gt;Let vReloadStart = now();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///$tab STICHPROBE&lt;/P&gt;&lt;P&gt;if filesize('$(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd') &amp;gt;0&amp;nbsp; then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; trace &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; $(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; MAX_TIME:&lt;/P&gt;&lt;P&gt;&amp;nbsp; load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(DTTSERF) as LAST_LOAD_TIME&lt;/P&gt;&lt;P&gt;&amp;nbsp; from $(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vLAST_LOAD_TIME =&amp;nbsp; timestamp(peek('LAST_LOAD_TIME',0,'MAX_TIME'), 'DD.MM.YYYY hh:mm:ss');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; trace &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LAST_LOAD_TIME:&amp;nbsp; $(vLAST_LOAD_TIME);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop table MAX_TIME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vLAST_LOAD_TIME = '$(vStartDate)';&lt;/P&gt;&lt;P&gt;&amp;nbsp; trace &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LAST_LOAD_TIME:&amp;nbsp; $(vLAST_LOAD_TIME);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// load new values&lt;/P&gt;&lt;P&gt;STICHPROBE:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vPlant)' as Plant,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;FROM $(vPlantAutor).STICHPROBE&lt;/P&gt;&lt;P&gt;WHERE DTTSERF &amp;gt; to_timestamp('$(vLAST_LOAD_TIME)', 'DD.MM.YYYY HH24:MI:SS');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// load prior values&lt;/P&gt;&lt;P&gt;if filesize('$(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd') &amp;gt;0&amp;nbsp; then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate(STICHPROBE)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;from $(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// store all values&lt;/P&gt;&lt;P&gt;store STICHPROBE into $(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vSTICHPROBE_LOAD_DURATION = Interval(now() - vStart) ;&lt;/P&gt;&lt;P&gt;LET vStart = now();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vSTICHPROBE_Size = num(filesize('$(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd')/1024,'00.0') &amp;amp; ' KB';&lt;/P&gt;&lt;P&gt;LET vSTICHPROBE_Records = QvdNoOfRecords ('$(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************************************************Script End******************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 09:53:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091691#M636185</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T09:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091692#M636186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;‌ any suggestion ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 10:01:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091692#M636186</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T10:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091693#M636187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as you are storing the date in timestamp, so from monday from what time you want to load the data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 10:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091693#M636187</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-04-11T10:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091694#M636188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Amit -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me get some clarity here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is where you are loading the data from, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;STICHPROBE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vPlant)' as Plant,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;SQL SELECT&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;*&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;FROM $(vPlantAutor).STICHPROBE&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;WHERE DTTSERF &amp;gt; to_timestamp('$(vLAST_LOAD_TIME)', 'DD.MM.YYYY HH24:MI:SS');&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;On a Friday, you want to load all the new data starting from Monday of the current week. Am I correct so far?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Now is this the place where you are trying to set value for &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vLAST_LOAD_TIME&lt;/STRONG&gt; using if then statement?&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 10:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091694#M636188</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-11T10:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091695#M636189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On "I think this is where you are loading the data from, right?"&amp;nbsp; : Yes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"On a Friday, you want to load all the new data starting from Monday of the current week. Am I correct so far?" : Yes Correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For "Now is this the place where you are trying to set value for &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vLAST_LOAD_TIME&lt;/STRONG&gt; using if then statement?"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Yes looking some condition here for "&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vLAST_LOAD_TIME" &lt;/STRONG&gt;to achieve this .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks,AS&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 10:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091695#M636189</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T10:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091696#M636190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are starting load from 6:00:00 AM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 10:11:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091696#M636190</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T10:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091697#M636191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vLAST_LOAD_TIME&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; seems to be based on today, I am not sure why we need the if then else statement. May be something like this might work?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vLAST_LOAD_TIME&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt; = TimeStamp(If(WeekDay(Today()) = 'Fri', DayStart(Now()-4) + 6/24, &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;DayStart(Now()) + 6/24), 'YourRequiredFormatHere');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 10:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091697#M636191</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-11T10:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091698#M636193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying something like below:&lt;/P&gt;&lt;P&gt;Let vLoadFrom = timestamp(If(Weekday($(vLAST_LOAD_TIME)) &amp;gt;= 5, WeekStart($(vLAST_LOAD_TIME)), $(vLAST_LOAD_TIME)), 'DD.MM.YYYY HH24:MI:SS');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STICHPROBE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vPlant)' as Plant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;NSPCIDNR,&lt;/P&gt;&lt;P&gt;NTOOLNR,&lt;/P&gt;&lt;P&gt;NSTPNR,&lt;/P&gt;&lt;P&gt;NPERS_IDNR&lt;/P&gt;&lt;P&gt;FROM $(vPlantAutor).STICHPROBE&lt;/P&gt;&lt;P&gt;WHERE DTTSERF &amp;gt; to_timestamp('$(vLoadFrom)', 'DD.MM.YYYY HH24:MI:SS');&lt;/P&gt;&lt;P&gt;store STICHPROBE into $(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But no sure if this is right???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 10:18:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091698#M636193</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T10:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091699#M636194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;try this&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;MAX_TIME:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; load if(weekday(today())='Fri', date(today()-5)+maketime(6),LAST_LOAD_TIME1) as LAST_LOAD_TIME;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; load&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(DTTSERF) as LAST_LOAD_TIME1&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; from $(vQVDCurrentYear)\$(vPlant)_STICHPROBE.qvd (qvd);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 10:20:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091699#M636194</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-04-11T10:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091700#M636195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1st check if &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d;"&gt;WeekStart($(vLAST_LOAD_TIME)&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d;"&gt;) is actually taking you to a Monday. You can do this on the front end of the application by check if WeekStart(Today()) is giving tyou 04/11/2016 or 04/10/2016 or some other date. You might have to adjust it if it isn't giving you a Monday -&amp;gt; &lt;/SPAN&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;WeekStart($(vLAST_LOAD_TIME), 0, &lt;/STRONG&gt;&lt;STRONG style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;1&lt;/STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;) &lt;/STRONG&gt;(Play around with the third argument in the WeekStart function).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other than that, give it a shot and see if it works or not. I would be curious to know if it is working or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 10:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091700#M636195</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-11T10:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091701#M636196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Output from=&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;WeekStart(Today())&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/121197_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 11:00:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091701#M636196</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T11:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091702#M636198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks good to me, give it a shot with your if statement and see if it works or not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 11:07:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091702#M636198</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-11T11:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091703#M636200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you think this below might work???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vLoadFrom = timestamp(If(Weekday($(vLAST_LOAD_TIME)) &amp;gt;= 5, WeekStart($(vLAST_LOAD_TIME)), $(vLAST_LOAD_TIME)), 'DD.MM.YYYY HH24:MI:SS');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 11:57:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091703#M636200</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T11:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091704#M636201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that it will always give you monday. Instead try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Let vLoadFrom = timestamp(If(Weekday($(vLAST_LOAD_TIME)) &amp;gt;= 5, ($(vLAST_LOAD_TIME)-5), $(vLAST_LOAD_TIME)), 'DD.MM.YYYY HH24:MI:SS');&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 12:04:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091704#M636201</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-04-11T12:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091705#M636203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So Kushal this below is not required:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vLAST_LOAD_TIME =&amp;nbsp; timestamp(peek('LAST_LOAD_TIME',0,'MAX_TIME'), 'DD.MM.YYYY hh:mm:ss');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to change this with the new logic???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 12:18:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091705#M636203</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T12:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091706#M636204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think -5 would be an issue on a Saturday or Sunday refresh. I don't see why WeekStart() won't give a Monday all the time Kush?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 12:19:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091706#M636204</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-11T12:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091707#M636206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it should work. Only other thing to check is Num(WeekDay(Today())) to ensure that you get 1. and Num(WeekDay(Today() + 5)) gives you 5, &lt;SPAN style="font-size: 13.3333px;"&gt;Num(WeekDay(Today() + 6)) gives 6 and &lt;SPAN style="font-size: 13.3333px;"&gt;Num(WeekDay(Today() + 7)) gives 7 in a text box object&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 12:21:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091707#M636206</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-11T12:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091708#M636208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Num(WeekDay(Today())) and &lt;SPAN style="font-size: 13.3333px;"&gt;Num(WeekDay(Today() + 7)) giving me 0 in text box &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Rest 5 and 6 is fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;AS&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 12:28:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091708#M636208</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T12:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091709#M636209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;LET vLoadFrom = TimeStamp(If(Num(WeekDay($(vLAST_LOAD_TIME))) &amp;gt;= 6 or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Num(WeekDay($(vLAST_LOAD_TIME))) = 0&lt;/SPAN&gt;, WeekStart($(vLAST_LOAD_TIME)), $(vLAST_LOAD_TIME)), '&lt;SPAN style="color: #ff0000;"&gt;DD.MM.YYYY HH24:MI:SS&lt;/SPAN&gt;');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The one last thing that concerns me is the this date format -&amp;gt; &lt;STRONG style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DD.MM.YYYY HH24:MI:SS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I don't think QlikView will recognize this, may be you want this -&amp;gt; &lt;STRONG style="color: #ff0000;"&gt;DD/MM/YYYY hh:mm:ss&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LET vLoadFrom = TimeStamp(If(Num(WeekDay($(vLAST_LOAD_TIME))) &amp;gt;= 6 or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Num(WeekDay($(vLAST_LOAD_TIME))) = 0&lt;/SPAN&gt;, WeekStart($(vLAST_LOAD_TIME)), $(vLAST_LOAD_TIME)), '&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;DD/MM/YYYY hh:mm:ss&lt;/STRONG&gt;');&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 12:34:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091709#M636209</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-11T12:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091710#M636210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this has to be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'DD.MM.YYYY hh:mm:ss'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me give a try!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 12:41:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-help/m-p/1091710#M636210</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2016-04-11T12:41:26Z</dc:date>
    </item>
  </channel>
</rss>

