<?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: Calendar Defaults in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549032#M205085</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, for the second calendar you could use&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;monthend (today(), -1 )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Oct 2013 15:02:37 GMT</pubDate>
    <dc:creator>bbi_mba_76</dc:creator>
    <dc:date>2013-10-11T15:02:37Z</dc:date>
    <item>
      <title>Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549031#M205084</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;The QV calendar object is currently driving me a bit mad!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two instances of a calendar object in my application and I want three things:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first calendar to be set to the current date when the user opens the application&lt;/P&gt;&lt;P&gt;I can do this with a trigger setting the field to =today().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second calendar to be set to the last day of the previous month. I don't know how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both calendars to be locked to always have one date selected. I don't want them to be cleared. There is no option for this in the properties of the calendar object. Is there another way to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 14:55:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549031#M205084</guid>
      <dc:creator />
      <dc:date>2013-10-11T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549032#M205085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, for the second calendar you could use&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;monthend (today(), -1 )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:02:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549032#M205085</guid>
      <dc:creator>bbi_mba_76</dc:creator>
      <dc:date>2013-10-11T15:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549033#M205086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actuall, on reflection I think I want the first calendar to be set to the day before yesterday. Is there a way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549033#M205086</guid>
      <dc:creator />
      <dc:date>2013-10-11T15:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549034#M205087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you could try =today()-2 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:05:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549034#M205087</guid>
      <dc:creator>bbi_mba_76</dc:creator>
      <dc:date>2013-10-11T15:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549035#M205088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Be careful with monthend() - it is a timestamp, returns the last second&amp;nbsp; of the motnh: 09/30/2013 11:59:59 PM.&amp;nbsp; If you want only date, use date(floor()):&lt;/P&gt;&lt;P&gt;date(floor(monthend (today(), -1)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:11:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549035#M205088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-11T15:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549036#M205089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That doesn't work unfortunately. I've created a variable and set it to =today() and then used it in the "select in field" trigger, which works. But if I put =today()-1 it doesn't.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549036#M205089</guid>
      <dc:creator />
      <dc:date>2013-10-11T15:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549037#M205090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, found this function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date(now()-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which seems to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My only outstanding issue is preventing the calendars being cleared. Is there a way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:33:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549037#M205090</guid>
      <dc:creator />
      <dc:date>2013-10-11T15:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549038#M205091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The trigger is format-sensitive (and set analysis too).&amp;nbsp; The expression today() returns date, byt today-1 returns integer, hence "select in field" doesn't work.&amp;nbsp; Try&lt;/P&gt;&lt;P&gt;=date(today()-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:34:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549038#M205091</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-11T15:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549039#M205092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Don't ever use now() on the front end&lt;/STRONG&gt;, you're asking for trouble.&amp;nbsp; It will be checking time non-stop.&amp;nbsp; Use date(today()-1).&amp;nbsp; The solution is in &lt;STRONG&gt;date&lt;/STRONG&gt;, not in &lt;STRONG&gt;now&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Add action "lock field" to prevent from clearing.&amp;nbsp; Apparently you'll have also to add unlock before selectiong the date:&lt;/P&gt;&lt;P&gt;1. unlock&lt;/P&gt;&lt;P&gt;2. select&lt;/P&gt;&lt;P&gt;3. lock&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549039#M205092</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-11T15:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549040#M205093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It´s clearing maybe because there´s no correlation to your date.&lt;/P&gt;&lt;P&gt;now() returns a timestamp, you should convert to a date without time&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;date(floor(now())-1), which is exactly equal date(today()-1)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:38:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549040#M205093</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-10-11T15:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549041#M205094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's helpful thanks. The calendars are clearing when you click the clear button, because they are like any another selection you make, and there seems to be no way to set them as "always one value selected" as you can do in listboxes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:48:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549041#M205094</guid>
      <dc:creator />
      <dc:date>2013-10-11T15:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Defaults</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549042#M205095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact, you can use "always one selected".&amp;nbsp; Create a list box with the same field, select one, and apply this property.&amp;nbsp; Now you can remove or hide list box - the property is on the field level, it stays valid for calendar as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Defaults/m-p/549042#M205095</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-11T15:50:52Z</dc:date>
    </item>
  </channel>
</rss>

