<?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 issue in incremental load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670888#M676282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Bruno,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have to somehow fix the format. I think I am just not capable to create timestamp valid in SQL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the issue now:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ErrorSource: OraOLEDB, ErrorMsg: ORA-01843: not a valid month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where 1=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and rank =1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and LASTMODIFIEDDATE &amp;gt;= '26.06.2014 23:45:14'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and LASTMODIFIEDDATE &amp;lt; '28.06.2014 11:01:04'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Jun 2014 09:30:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-28T09:30:12Z</dc:date>
    <item>
      <title>Timestamp issue in incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670886#M676280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my first question that I was not able to solve by reading your answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within incremental load logic there is condition within SQL statement. The condition is as folowing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where LASTMODIFIEDDATE &amp;gt;= '$(vLastExecTime)' and LASTMODIFIEDDATE &amp;lt; '$(vExecTime)'&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt; while variables are filled as follows:&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LET vExecTime = LocalTime();&lt;/P&gt;&lt;P&gt;IF (NOT isNull(QvdCreateTime('$(vQVDPath)M_LOANREQUEST.qvd'))) THEN&lt;BR /&gt;LoadTime:&lt;BR /&gt;LOAD Max(LASTMODIFIEDDATE) as LASTMODIFIEDDATE&lt;BR /&gt;FROM $(vQVDPath)M_LOANREQUEST.qvd (qvd);&lt;BR /&gt;LET vLastExecTime = peek('LastModifiedDate',0,'LoadTime');&lt;BR /&gt;DROP Table LoadTime;&lt;BR /&gt;END IF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the issue is that I receive the latest date - end of day yesterday. So I suppose there is some missmatch in hour/minute/seconds formats in SQL and Qlikview.&lt;/P&gt;&lt;P&gt; this is format of date in QV&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD.MM.YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;this is timestamp format in SQL developer&lt;/P&gt;&lt;P&gt;DD-MON-RR HH.MI.SSXFF AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried several options such as:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and LASTMODIFIEDDATE &amp;gt;= to_timestamp('$(vLastExecTime)','DD-MON-RR HH.MI.SSXFF AM TZR') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however I still receive just end of day yesterday. The source is updated online and this is very much needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me how I can compare timestamps in SQL statements using variables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 15:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670886#M676280</guid>
      <dc:creator />
      <dc:date>2014-06-27T15:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue in incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670887#M676281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a little problem with your script. You load the field &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LASTMODIFIEDDATE&lt;/SPAN&gt; from the QVD but you try to read the field &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LastModifiedDate&lt;/SPAN&gt; to save in the variable. Change the line&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;LET vLastExecTime = peek('LastModifiedDate',0,'LoadTime');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;LET vLastExecTime = peek('&lt;SPAN style="color: #3d3d3d;"&gt;LASTMODIFIEDDATE&lt;/SPAN&gt;',0,'LoadTime');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and see if it solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 18:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670887#M676281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-27T18:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue in incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670888#M676282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Bruno,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have to somehow fix the format. I think I am just not capable to create timestamp valid in SQL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the issue now:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ErrorSource: OraOLEDB, ErrorMsg: ORA-01843: not a valid month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where 1=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and rank =1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and LASTMODIFIEDDATE &amp;gt;= '26.06.2014 23:45:14'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and LASTMODIFIEDDATE &amp;lt; '28.06.2014 11:01:04'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jun 2014 09:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670888#M676282</guid>
      <dc:creator />
      <dc:date>2014-06-28T09:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue in incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670889#M676283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Matej.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So we have to figureout the timestamp format of your database. Let's try setting the variables like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vExecTime = Timestamp(LocalTime(), 'MM-DD-YYYY hh:mm:ss');&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vLastExecTime = Timestamp(Peek('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LASTMODIFIEDDATE&lt;/SPAN&gt;'), '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MM-DD-YYYY hh:mm:ss&lt;/SPAN&gt;');&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If it doesn't work, try changing the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MM-DD-YYYY hh:mm:ss&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'&lt;/SPAN&gt; until it matches the DB timestamp format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jun 2014 17:55:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670889#M676283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-28T17:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue in incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670890#M676284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oracle Timestamp literal format is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIMESTAMP 'YYYY-MM-DD hh:mm:ss'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the string "TIMESTAMP" is part of the specification, that's not a QV function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use &lt;A href="http://qlikviewcomponents.org/"&gt;Qlikview Components (QVC)&lt;/A&gt; to do your incremental loads, QVC has knowledge of the formats used by various databases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jun 2014 21:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-issue-in-incremental-load/m-p/670890#M676284</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-06-28T21:59:04Z</dc:date>
    </item>
  </channel>
</rss>

