<?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: issues with month() for dates crossing into a new month in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629913#M46902</link>
    <description>&lt;P&gt;Hi There, Please use below -&lt;/P&gt;&lt;P&gt;Month(monthend(Timestamp#([Closed Date],'DD/MM/YYYY hh.mm tt'), 'DD/MM/YYYY')) as Month&lt;/P&gt;&lt;P&gt;num(Week(Timestamp#([Closed Date],'DD/MM/YYY hh:mm:ss')),'00') as Week&lt;/P&gt;&lt;P&gt;No doubt on your script, it is just a small change!&lt;/P&gt;&lt;P&gt;Thanks, Rahul R&lt;/P&gt;</description>
    <pubDate>Tue, 01 Oct 2019 07:51:04 GMT</pubDate>
    <dc:creator>rathore01</dc:creator>
    <dc:date>2019-10-01T07:51:04Z</dc:date>
    <item>
      <title>issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629839#M46890</link>
      <description>&lt;P&gt;Hi need some help with Month() or MonthName() when it comes to handling dates that are crossing over from an old month into a new Month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've&amp;nbsp; a list of dates say starts from 1 September 2019 12:00AM to 30 Septepmber 2019 23:59PM&lt;/P&gt;&lt;P&gt;here is my Data below : Data in both Weeks and Month Script are as followed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='$#,##0.00;-$#,##0.00';&lt;BR /&gt;SET TimeFormat='h:mm:ss TT';&lt;BR /&gt;SET DateFormat='DD/MM/YYYY';&lt;BR /&gt;SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';&lt;BR /&gt;SET FirstWeekDay=0;&lt;BR /&gt;SET BrokenWeeks=0;&lt;BR /&gt;SET ReferenceDay=0;&lt;BR /&gt;SET FirstMonthOfYear=1;&lt;BR /&gt;SET CollationLocale='en-SG';&lt;BR /&gt;SET CreateSearchIndexOnReload=1;&lt;BR /&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';&lt;BR /&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;BR /&gt;SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';&lt;/P&gt;&lt;P&gt;Load&amp;nbsp;&lt;/P&gt;&lt;P&gt;Closed Date,&lt;/P&gt;&lt;P&gt;month(Monthend(Date#([Closed Date],'DD\MM\YYYY hh:mm:ss'))) as Month,&lt;/P&gt;&lt;P&gt;num(Week(Date#([Closed Date],'DD/MM/YYY hh:mm:ss')),'00') as Week&lt;/P&gt;&lt;P&gt;From Sample.xlsx;&lt;/P&gt;&lt;P&gt;For some odd reason, the script is reading my 1st and 2nd Sep as AUG instead of SEP&lt;/P&gt;&lt;P&gt;First of the Week for me is Monday as shown in&amp;nbsp;FirstWeekDay=0;&lt;/P&gt;&lt;P&gt;I've attached sample data below.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 05:43:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629839#M46890</guid>
      <dc:creator>Keitaru</dc:creator>
      <dc:date>2019-10-01T05:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629845#M46891</link>
      <description>&lt;P&gt;date# should use the same format as string, maybe try this?&lt;/P&gt;&lt;P&gt;month(monthend(Date#(subfield([closeddate],' ',1),'DD/MM/YYYY')))&lt;/P&gt;&lt;P&gt;if it doesn't work, check this and see if it returns right date&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Date(Date#(subfield([closeddate],' ',1),'DD/MM/YYYY')))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 06:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629845#M46891</guid>
      <dc:creator>asinha1991</dc:creator>
      <dc:date>2019-10-01T06:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629900#M46900</link>
      <description>&lt;P&gt;I personally don't think there is anything wrong with my script just some how there is an odd bug in the back that assigning&amp;nbsp; week's previous month in to the new month.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 07:32:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629900#M46900</guid>
      <dc:creator>Keitaru</dc:creator>
      <dc:date>2019-10-01T07:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629913#M46902</link>
      <description>&lt;P&gt;Hi There, Please use below -&lt;/P&gt;&lt;P&gt;Month(monthend(Timestamp#([Closed Date],'DD/MM/YYYY hh.mm tt'), 'DD/MM/YYYY')) as Month&lt;/P&gt;&lt;P&gt;num(Week(Timestamp#([Closed Date],'DD/MM/YYY hh:mm:ss')),'00') as Week&lt;/P&gt;&lt;P&gt;No doubt on your script, it is just a small change!&lt;/P&gt;&lt;P&gt;Thanks, Rahul R&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 07:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629913#M46902</guid>
      <dc:creator>rathore01</dc:creator>
      <dc:date>2019-10-01T07:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629942#M46905</link>
      <description>&lt;P&gt;Hi Rahul&lt;/P&gt;&lt;P&gt;I've tried your tweak&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Month(monthend(Timestamp#([Closed Date],'DD/MM/YYYY hh.mm tt'), 'DD/MM/YYYY')) as Month&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Even through there was no much of a change in the displayed data, I did notice my chart didnt seem to read the set analysis well&lt;/P&gt;&lt;P&gt;LET vLastMonth = '*/'&amp;amp;date(AddMonths(date(Today(),'MM/YYYY'),-1,),'MM/YYYY');&lt;/P&gt;&lt;P&gt;vLastMonth = */09/2019&lt;/P&gt;&lt;P&gt;=count({&amp;lt;[Month]={'$(vLastMonth)'}&amp;gt;}[Problem ID])&lt;/P&gt;&lt;P&gt;so instead of showing me the month of September count which is 337 it showing something different.&lt;/P&gt;&lt;P&gt;However when i use&amp;nbsp;*/09/2019 in the smart search it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 09:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629942#M46905</guid>
      <dc:creator>Keitaru</dc:creator>
      <dc:date>2019-10-01T09:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629961#M46906</link>
      <description>&lt;P&gt;I couldn't reproduce the issue. However, since the excel data looks to have already timestamp values, I would suggest to use just month() and try like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Close Date]) as Month&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 09:30:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629961#M46906</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-10-01T09:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629967#M46907</link>
      <description>&lt;P&gt;the Month original format is in 'DD/MM/YYYY HH:MM:SS'&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 09:57:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629967#M46907</guid>
      <dc:creator>Keitaru</dc:creator>
      <dc:date>2019-10-01T09:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629978#M46908</link>
      <description>&lt;P&gt;What is your data source? Try loading the timestamp field using month() as I said earlier. If that doesn't give you any output, that means qlik engine is not reading it as timestamp but string, in that case use &lt;STRONG&gt;month(date#(&lt;/STRONG&gt;.. I don't see why you need monthend() here. Give a try.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 10:17:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629978#M46908</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-10-01T10:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629979#M46909</link>
      <description>&lt;P&gt;I've attached here the original data set which I had pulled from my data source and did some data Masking&lt;/P&gt;&lt;P&gt;Previously I've not had any issues with this till recently which is why i'm quite puzzled to whats causing the problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 10:28:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629979#M46909</guid>
      <dc:creator>Keitaru</dc:creator>
      <dc:date>2019-10-01T10:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629981#M46910</link>
      <description>&lt;P&gt;could it be because of this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SET CollationLocale='en-SG'; in your system variable on top?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;maybe because it is considering your date as UTC and converting it to SG?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am just guessing, cant think of anything else..excel didn't show same issue in my env too&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 10:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629981#M46910</guid>
      <dc:creator>asinha1991</dc:creator>
      <dc:date>2019-10-01T10:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: issues with month() for dates crossing into a new month</title>
      <link>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629982#M46911</link>
      <description>&lt;P&gt;I see this is happening for border dates like 1st of Sep moves to Aug right?&lt;/P&gt;&lt;P&gt;it could be due to some conversion happening as I said due to timestamp&amp;nbsp; or some issue because of time.&lt;/P&gt;&lt;P&gt;so maybe it will work to consider this as text(or type cast using text function),remove time part and do calculation on month&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 10:41:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/issues-with-month-for-dates-crossing-into-a-new-month/m-p/1629982#M46911</guid>
      <dc:creator>asinha1991</dc:creator>
      <dc:date>2019-10-01T10:41:54Z</dc:date>
    </item>
  </channel>
</rss>

