<?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: Help with Date format in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579433#M683281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;something tells me I am missing something obvious.&amp;nbsp; I have never had this much trouble on this type of analysis before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Mar 2014 16:44:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-15T16:44:29Z</dc:date>
    <item>
      <title>Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579425#M683273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone see anything clearl wrong with this script and why it appears to be treating my date as a string?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is creating a Weekend date based on a Thursday weekend.&amp;nbsp; The logic is working but when I try to use this in a variable in set analysis it wont recognize it as a date even if I try to format it.&amp;nbsp; But I created the same code converting to a NUM() and it shows the correct number for each date.&amp;nbsp; In my set analysis I am using the max() function to create a variable of the max available week selected then I need to use that in set analysis to compare to the field below but it wont recognize it.&amp;nbsp; No error, it just ignores it.&amp;nbsp; Frustrating but I havent worked with date variables in quite a while.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if(TempDate &amp;gt; weekend(TempDate)-3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(floor(weekend(TempDate))+4,'M/D/YYYY'),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(floor(weekend(TempDate)-3),'M/D/YYYY'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as THU_WeekEnd,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 02:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579425#M683273</guid>
      <dc:creator />
      <dc:date>2014-03-15T02:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579426#M683274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In variable if you use Max(Date) will return the date in numeric format, in set analysis date formats should be same.&amp;nbsp; You convert the numeric date into date by using this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Date(Max(Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should work, if not check the format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 06:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579426#M683274</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-03-15T06:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579427#M683275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this several options,&lt;/P&gt;&lt;P&gt;1.You can change above script to&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;if(TempDate &amp;gt; weekend(TempDate)-3,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(date#(floor(weekend(TempDate))+4,'M/D/YYYY')&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;,'M/D/YYYY'&lt;/SPAN&gt;),&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;date#(&lt;/SPAN&gt;floor(weekend(TempDate)-3),'M/D/YYYY')&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;,'M/D/YYYY')&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as THU_WeekEnd,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and in your set analysis use&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;Date(Max(Date)) //Date field should be date fieldname it is case sensitive.&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;2.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you are using your script using Num()&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;then in your set analysis &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;You have to compare it with&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Num(Max(Date))&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; //Date field should be date fieldname it is case sensitive.&lt;/SPAN&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 07:15:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579427#M683275</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-15T07:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579428#M683276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set Analysis is dependant on the format of the date as well as the value.&amp;nbsp; This seems a bit odd to me, but it is the case.&amp;nbsp; As Jagan suggests you need to format the date that you are pushing into Set Analysis, but as you are specifying a fixed format in your load script you need to specify exactly the same format in Set Analysis, eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Date(Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;THU_WeekEnd&lt;/SPAN&gt;), 'M/D/YYYY')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should then work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 07:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579428#M683276</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2014-03-15T07:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579429#M683277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately I tried that but same problem.&amp;nbsp; format of date and variable are the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 14:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579429#M683277</guid>
      <dc:creator />
      <dc:date>2014-03-15T14:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579430#M683278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your option #1 does not return any values for the WeekEnd field and I tried option 2 previously.&amp;nbsp; This one is a mystery to me.&amp;nbsp; Very frustrating.&amp;nbsp; I am wondering if the weekend function is causing the problem.&amp;nbsp; the %DateKey field works using the same TempDate , it is just the Thu_WeekEnd field that doesnt work and only difference is the WeekEnd() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 15:18:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579430#M683278</guid>
      <dc:creator />
      <dc:date>2014-03-15T15:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579431#M683279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible can you share your app with some sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 15:33:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579431#M683279</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-15T15:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579432#M683280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Due to the sensitive data I am not able to without a lot of work up front.&amp;nbsp; Does this help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script Statement in MasterCalendar linked to Fact table by %DateKey.&amp;nbsp; I changed it to eliminate the Weekend() function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(WeekDay(TempDate) = 'Thu', num(floor(TempDate)),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Fri', num(floor(TempDate))+6,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Sat', num(floor(TempDate))+5,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Sun', num(floor(TempDate))+4,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Mon', num(floor(TempDate))+3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Tue', num(floor(TempDate))+2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Wed', num(floor(TempDate))+1))))))) as Thu_WeekEnd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the WeekEnd Field is showing as&amp;nbsp; i.e. 41711&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression (I gave up on using variable for now)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Thu_WeekEnd ={$(=max(Thu_WeekEnd)-7)},[GL Account Type] = {'Income'},JournalHdr = {'Sales Journal'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User selects a date in the Thu_WeekEnd field i.e. 41704&lt;/P&gt;&lt;P&gt;Result of max() in set analysis = 41697 (proven in text box)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result of above sums the values for the 41704 week NOT the 41697 week (prior week)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what I am missing.&amp;nbsp; I am simply trying to show the week over week change based on the user selections&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Tran Detail Amt])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Tran Detail Amt])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 16:25:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579432#M683280</guid>
      <dc:creator />
      <dc:date>2014-03-15T16:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579433#M683281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;something tells me I am missing something obvious.&amp;nbsp; I have never had this much trouble on this type of analysis before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 16:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579433#M683281</guid>
      <dc:creator />
      <dc:date>2014-03-15T16:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579434#M683282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is almost as if it is completely ignoring the max portion of the set analysis.&amp;nbsp; When user clears selection for weekend, it sums everything&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 16:46:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579434#M683282</guid>
      <dc:creator />
      <dc:date>2014-03-15T16:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579435#M683283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi .I things its looking correct to me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you convert numbers into date then it will be Previous weekend you want&lt;/P&gt;&lt;P&gt;see the attached &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example i have selected 13/03/2013 and previous weekend it showing as 06/03/2013.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 16:46:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579435#M683283</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2014-03-15T16:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579436#M683284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because you are using the &lt;STRONG&gt;Floor&lt;/STRONG&gt; statement this is getting converted to an integer field.&amp;nbsp; If you replace &lt;STRONG&gt;Floor&lt;/STRONG&gt; with &lt;STRONG&gt;DayStart&lt;/STRONG&gt; and remove the &lt;STRONG&gt;Num&lt;/STRONG&gt; function this should return a date in your default date format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather than relying on default formats though you can always force the format with a &lt;STRONG&gt;Date&lt;/STRONG&gt; function.&amp;nbsp; Wrap your entire statement in a &lt;STRONG&gt;Date&lt;/STRONG&gt; function and it will cause it to display as you want it (remember that dates are only ever numbers - it's only how they display that changes).&amp;nbsp; The code would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(If(WeekDay(TempDate) = 'Thu', num(floor(TempDate)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Fri', num(floor(TempDate))+6,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Sat', num(floor(TempDate))+5, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Sun', num(floor(TempDate))+4,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Mon', num(floor(TempDate))+3,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Tue', num(floor(TempDate))+2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(WeekDay(TempDate) = 'Wed', num(floor(TempDate))+1))))))), 'M/D/YYYY') as Thu_WeekEnd,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could then use the code I posted above in your variable for getting the max date:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;=Date(Max(&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;THU_WeekEnd&lt;/SPAN&gt;), 'M/D/YYYY')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will then give a date in a matching format.&amp;nbsp; Once your date formats match then Set Analysis should start behaving itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 23:27:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Date-format/m-p/579436#M683284</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2014-03-15T23:27:46Z</dc:date>
    </item>
  </channel>
</rss>

