<?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: Difference between dates - problem! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629539#M446365</link>
    <description>&lt;P&gt;Works a treat!&amp;nbsp; Thanks so much.&amp;nbsp; Many thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2019 12:06:16 GMT</pubDate>
    <dc:creator>jlampard40</dc:creator>
    <dc:date>2019-09-30T12:06:16Z</dc:date>
    <item>
      <title>Difference between dates - problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629519#M446360</link>
      <description>&lt;P&gt;Hi guys.&amp;nbsp; I have two dates I want to calculate the days difference between.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first date field is called [WBR_Event_Date] and the second field is called [WBR_Clock_Reset_Date].&amp;nbsp; I need to find out the days between the two.&amp;nbsp; This seems easy enough.&amp;nbsp; However, within the WBR_Event_Date values is a date value of 01/01/2099 (this represents non booked event date).&amp;nbsp; I'd like to somehow replace this value with current date (today's date every time we load the daily data).&amp;nbsp; I can then work out the difference between the two dates and, where event date = 01/01/2099 it's replaced with current date so we can derive 'Total days waiting to date' as an additional field to add into my table.&lt;/P&gt;&lt;P&gt;How do I go about firstly replacing all of the 01/01/2099 dates with current (today's date) and then calculating the difference between this and the other field I've mentioned above?&amp;nbsp; Having problems...!&amp;nbsp; Really appreciate your help.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:21:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629519#M446360</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2024-11-16T02:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between dates - problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629524#M446361</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;On the Script side you may use RangeMin when loading&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;WBR_Event_Date:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RangeMin(Today(),&amp;nbsp;&amp;nbsp;WBR_Event_Date) as&amp;nbsp;&amp;nbsp;WBR_Event_Date,&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where I have supposed that&amp;nbsp;WBR_Event_Date is lower or equal than today except when it is&amp;nbsp;01/01/2099. If&amp;nbsp;WBR_Event_Date can be greater than today then use a simple if statement in the LOAD: &lt;EM&gt;if(WBR_Event_Date = MakeDate(2099), Today(),&amp;nbsp;WBR_Event_Date)&lt;/EM&gt; or similar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 11:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629524#M446361</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-09-30T11:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between dates - problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629533#M446363</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; I can't seem to get it to work.&amp;nbsp; This is my load script at the moment.&amp;nbsp; I've had to convert the two date fields (Clock Reset and Event Date) into DD/MM/YYYY as the original data came in the format YYYY-MM-DD and the end user is not happy about viewing dates this way.&lt;/P&gt;&lt;P&gt;Can you advise how I modify this script to find and replace all of the 01/01/2099's as today's date (current date as of day script is run).&amp;nbsp; Many thanks!&lt;/P&gt;&lt;P&gt;LOAD [Event key] as WBR_Event_Key,&lt;BR /&gt;Target as WBR_Target,&lt;BR /&gt;[42d_Breach] as WBR_42d_Breach,&lt;BR /&gt;[14d_Breach] as WBR_14d_Breach,&lt;BR /&gt;[CRIS No.] as WBR_CRIS_No,&lt;BR /&gt;Surname as WBR_Surname,&lt;BR /&gt;Forenames as WBR_Forenames,&lt;BR /&gt;DOB as WBR_DOB,&lt;BR /&gt;Mod as WBR_Mod,&lt;BR /&gt;Examination as WBR_Examination,&lt;BR /&gt;Room as WBR_Room,&lt;BR /&gt;date(floor(timestamp([Clock Reset Date])),'DD/MM/YYYY') as WBR_Clock_Reset_Date,&lt;BR /&gt;date(floor(timestamp([Event Date])),'DD/MM/YYYY') as WBR_Event_Date,&lt;BR /&gt;Days_Waiting as WBR_Days_Waiting,&lt;BR /&gt;Appointment as WBR_Appointment,&lt;BR /&gt;[Patient Type Des] as WBR_Patient_Type_Des,&lt;BR /&gt;Urgency as WBR_Urgency,&lt;BR /&gt;GA as WBR_GA,&lt;BR /&gt;Cardiac as WBR_Cardiac,&lt;BR /&gt;Vascular as WBR_Vascular,&lt;BR /&gt;AgeGrp as WBR_AgeGrp,&lt;BR /&gt;[42d_Breach_Status] as WBR_42_Breach_Status,&lt;BR /&gt;Target_Month as WBR_Target_Month&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 11:43:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629533#M446363</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-09-30T11:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between dates - problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629537#M446364</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi! In red my modifications:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD [Event key] as WBR_Event_Key,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Target as WBR_Target,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[42d_Breach] as WBR_42d_Breach,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[14d_Breach] as WBR_14d_Breach,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[CRIS No.] as WBR_CRIS_No,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Surname as WBR_Surname,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Forenames as WBR_Forenames,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DOB as WBR_DOB,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Mod as WBR_Mod,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Examination as WBR_Examination,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Room as WBR_Room,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;date(floor(timestamp([Clock Reset Date])),'DD/MM/YYYY') as WBR_Clock_Reset_Date,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;if(Year([Event Date]) = 2099, Today(),&lt;/FONT&gt; date(floor(timestamp([Event Date])),'DD/MM/YYYY')&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt; as WBR_Event_Date,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Days_Waiting as WBR_Days_Waiting,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Appointment as WBR_Appointment,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Patient Type Des] as WBR_Patient_Type_Des,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Urgency as WBR_Urgency,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;GA as WBR_GA,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Cardiac as WBR_Cardiac,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Vascular as WBR_Vascular,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;AgeGrp as WBR_AgeGrp,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[42d_Breach_Status] as WBR_42_Breach_Status,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Target_Month as WBR_Target_Month&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;When a LOAD statement is executed, the table is read row by row. Thus, you only have to check if the content of&amp;nbsp;&lt;EM&gt;[Event Date]&amp;nbsp;&lt;/EM&gt;is 01/01/2099 and modify it if so (you don't need to "&lt;SPAN&gt;find and replace" after the load statement).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jaime.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 11:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629537#M446364</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-09-30T11:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between dates - problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629539#M446365</link>
      <description>&lt;P&gt;Works a treat!&amp;nbsp; Thanks so much.&amp;nbsp; Many thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 12:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629539#M446365</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-09-30T12:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between dates - problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629548#M446366</link>
      <description>&lt;P&gt;Cheeky addition...if I then wanted to highlight in red font, those dates which are 01/01/2099 (now changed to today's date) is there any way of doing this too?&amp;nbsp; I just want users to realise that even though there is a date in this field, it's only today's date and NOT an actual event date.&amp;nbsp; Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 12:34:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629548#M446366</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-09-30T12:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between dates - problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629642#M446373</link>
      <description>&lt;P&gt;You just need a flag that marks whether a date is modified or not&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD [Event key] as WBR_Event_Key,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Target as WBR_Target,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[42d_Breach] as WBR_42d_Breach,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[14d_Breach] as WBR_14d_Breach,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[CRIS No.] as WBR_CRIS_No,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Surname as WBR_Surname,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Forenames as WBR_Forenames,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DOB as WBR_DOB,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Mod as WBR_Mod,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Examination as WBR_Examination,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Room as WBR_Room,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;date(floor(timestamp([Clock Reset Date])),'DD/MM/YYYY') as WBR_Clock_Reset_Date,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;if(Year([Event Date]) = 2099, Today(),&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;date(floor(timestamp([Event Date])),'DD/MM/YYYY')&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as WBR_Event_Date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;if(Year([Event Date]) = 2099, 1, 0) as Flag_ModifiedDate&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Days_Waiting as WBR_Days_Waiting,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Appointment as WBR_Appointment,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Patient Type Des] as WBR_Patient_Type_Des,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Urgency as WBR_Urgency,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;GA as WBR_GA,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Cardiac as WBR_Cardiac,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Vascular as WBR_Vascular,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;AgeGrp as WBR_AgeGrp,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[42d_Breach_Status] as WBR_42_Breach_Status,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Target_Month as WBR_Target_Month&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now use that flag in your charts to build a colouring condition.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 15:16:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-problem/m-p/1629642#M446373</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-09-30T15:16:07Z</dc:date>
    </item>
  </channel>
</rss>

