<?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 New calculated time field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323602#M1196532</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;if(logdate-decisiondate=0, 'Same', logdate-decisiondate) as process time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Apr 2011 12:28:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-21T12:28:24Z</dc:date>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323600#M1196530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have two fields, [Log Date] and [Decision Date], loaded as follows:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Date(Date#( left( [Log Date],9), 'DD-MMM-YY')) as [Log Date],&lt;BR /&gt; Date(Date#( [Decision Date], 'DD-MMM-YY')) as [Decision Date],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I would like to create a new field called [Process Time], which subtracts the Log Date from the Decision Date and returns me the number of DAYS.&lt;/P&gt;&lt;P&gt;So if Log Date is 18-APR-2011 and Decision Date is 20-APR-2011 the Process Time must be "2 days".&lt;/P&gt;&lt;P&gt;BUT if the application was logged and finalised on the SAME date (process time = 0 days), it must display as "Same Day"&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 12:18:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323600#M1196530</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-21T12:18:58Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323601#M1196531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;if([Decision Date]=[Log Date],'Same Day', if([Decision Date]-[LogDate] = 1, '1 day', [Decision Date]-[Log Date] &amp;amp; 'days')) as [Process TIme]&lt;/P&gt;&lt;P&gt;I have not tried this myself though!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 12:23:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323601#M1196531</guid>
      <dc:creator>chris_johnson</dc:creator>
      <dc:date>2011-04-21T12:23:54Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323602#M1196532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;if(logdate-decisiondate=0, 'Same', logdate-decisiondate) as process time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 12:28:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323602#M1196532</guid>
      <dc:creator />
      <dc:date>2011-04-21T12:28:24Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323603#M1196533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is this working for you? I made little example&lt;/P&gt;&lt;P&gt;t:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; F1, F2&lt;BR /&gt; 20-March-2009, 15-March-2009&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;load *, F1 - F2 as diff resident t;&lt;BR /&gt;&lt;BR /&gt;drop table t;&lt;/P&gt;&lt;P&gt;Seams it's not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 12:42:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323603#M1196533</guid>
      <dc:creator />
      <dc:date>2011-04-21T12:42:44Z</dc:date>
    </item>
    <item>
      <title>AW:Re: New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323604#M1196534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;change your example to&lt;/P&gt;&lt;P&gt;load *, date#(F1,'DD-MMMM-YYYY') - date#(F2,'DD-MMMM-YYYY') as diff resident t;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 12:49:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323604#M1196534</guid>
      <dc:creator>martinpohl</dc:creator>
      <dc:date>2011-04-21T12:49:51Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323605#M1196535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not working yet, but it's due to our IT department being silly so I havge different date formats, and some are even timestamps and not just dates.&lt;/P&gt;&lt;P&gt;I have&lt;/P&gt;&lt;P&gt;Date(Date#( left( [Log Date],11), 'DD-MMM-YYYY')) as [Log Date],&lt;BR /&gt; Date(Date#( [Decision Date], 'DD-MMM-YYYY')) as [Decision Date],&lt;/P&gt;&lt;P&gt;Wil try the other suggestions now...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:01:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323605#M1196535</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-21T13:01:05Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323606#M1196536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope...&lt;/P&gt;&lt;P&gt;I now have&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Date(Date#( left( [Log Date],11), 'DD-MMM-YYYY')) as [Log Date],&lt;BR /&gt; Date(Date#( [Decision Date], 'DD-MMM-YYYY')) as [Decision Date],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;if([Log Date]-[Decision Date]=0, 'Same Day', [Log Date]-[Decision Date]) as [Process Time],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It loads fine but process time field is blank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323606#M1196536</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-21T13:05:30Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323607#M1196537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I now change the expression to the following to try and track down the problem:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;if([Log Date]-[Decision Date]=0, 'Same Day', 'No') as [Process Time],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And they are all now "No". So this means that the two fields (even though the dates are the same for most) are not seen as the same. This must be due to the fact that one is a time stamp ('DD-MMM-YYYY HH:MM:SS') and the other just a date ('DD-MMM-YYYY').&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:09:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323607#M1196537</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-21T13:09:43Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323608#M1196538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;B&gt;&lt;I&gt;if(date#([Log Date],'DD-MMMM-YYYY') =date#([Decision Date],'DD-MMMM-YYYY'), 'Same Day',&lt;/I&gt;&lt;/B&gt; &lt;B&gt;&lt;I&gt;date#([Log Date],'DD-MMMM-YYYY') -date#([Decision Date],'DD-MMMM-YYYY')&lt;/I&gt;&lt;/B&gt;&lt;B&gt;&lt;I&gt;) as [Process Time],&lt;/I&gt;&lt;/B&gt;&lt;BR /&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:10:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323608#M1196538</guid>
      <dc:creator />
      <dc:date>2011-04-21T13:10:11Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323609#M1196539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is driving me crazy.&lt;/P&gt;&lt;P&gt;I tried the above and got an error (remember it's MMM not MMMM). I played around with it a bit, but there are too many damn ('s and )'s I can't get it right!&lt;/P&gt;&lt;P&gt;At the moment I have&lt;/P&gt;&lt;P&gt;if(Date#( left( [Log Date],11), 'DD-MMM-YYYY')) =date#([Decision Date],'DD-MMM-YYYY'), 'Same Day', Date#( left( [Log Date],11)), 'DD-MMM-YYYY' -date#([Decision Date],'DD-MMM-YYYY') as [Process Time],&lt;/P&gt;&lt;P&gt;But the error tells me "if takes 2-3 parameters"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:29:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323609#M1196539</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-21T13:29:18Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323610#M1196540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think you have an extra bracket in at the start&lt;/P&gt;&lt;P&gt;if( Date#( left([LogDate],11),'DD-MMM-YYYY') = date#...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:32:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323610#M1196540</guid>
      <dc:creator>chris_johnson</dc:creator>
      <dc:date>2011-04-21T13:32:10Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323611#M1196541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally Success!!!&lt;/P&gt;&lt;P&gt;if(Date#( left( [Log Date],11), 'DD-MMM-YYYY') =date#([Decision Date],'DD-MMM-YYYY'), 'Same Day', date#([Decision Date],'DD-MMM-YYYY')-Date#( left( [Log Date],11), 'DD-MMM-YYYY')) as [Process Time],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you guys,&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:36:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323611#M1196541</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-21T13:36:05Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323612#M1196542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you got there in the end!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:42:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323612#M1196542</guid>
      <dc:creator>chris_johnson</dc:creator>
      <dc:date>2011-04-21T13:42:41Z</dc:date>
    </item>
    <item>
      <title>New calculated time field</title>
      <link>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323613#M1196543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you solved your problem.&lt;/P&gt;&lt;P&gt;actually thank other guys who posted here. I'm just mixed their script ^^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:50:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-calculated-time-field/m-p/323613#M1196543</guid>
      <dc:creator />
      <dc:date>2011-04-21T13:50:57Z</dc:date>
    </item>
  </channel>
</rss>

