<?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 Problem to get the day from date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303593#M1179664</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! Miguel Angel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jan 2012 22:24:36 GMT</pubDate>
    <dc:creator>julruiz123</dc:creator>
    <dc:date>2012-01-24T22:24:36Z</dc:date>
    <item>
      <title>Problem to get the day from date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303588#M1179659</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;I have the next situation &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;LET vDate = Today();&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;//Obtener hasta que fecha actualizar el histórico&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;IF Day($(vDate)) = 24 THEN&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt; ...&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;ELSE&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt; ...&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;ENDIF&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Today is 24 but when i run the script runs "else" expression. &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;In text object shows the value such as&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;CODE&gt;Day($(vDate)) = 30&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;CODE&gt;Day(vDate) = 24&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Why ??&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Thanks!&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 18:31:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303588#M1179659</guid>
      <dc:creator>julruiz123</dc:creator>
      <dc:date>2012-01-24T18:31:35Z</dc:date>
    </item>
    <item>
      <title>Problem to get the day from date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303589#M1179660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; If you create a variable in variable overview you need to use "$" in order to evaluate the expression. &lt;/P&gt;&lt;P&gt;If you are trying to get the value using script you don't have to use $.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 18:46:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303589#M1179660</guid>
      <dc:creator />
      <dc:date>2012-01-24T18:46:59Z</dc:date>
    </item>
    <item>
      <title>Problem to get the day from date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303590#M1179661</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;Why not use the Day() function in the LET variable assignment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vDate = Day(Today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 19:01:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303590#M1179661</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-01-24T19:01:31Z</dc:date>
    </item>
    <item>
      <title>Problem to get the day from date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303591#M1179662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now i have the code in this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vDate = Today(); //Fecha actual&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vDay = Day(Today()); //Día actual&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//Obtener hasta que fecha actualizar el histórico&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF $(vDay) = 24 THEN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; LET vDateUpdate = MonthEnd(AddMonths(Today(),-2)); //Fecha hasta donde cargar el historial&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; LET vDateNewUpdate = MonthStart(AddMonths(Today(),-1)); //Fecha desde donde se hace la nueva carga&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ELSE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; LET vDateUpdate = MonthEnd(Addmonths(Today(),-1)); //Fecha hasta donde cargar el historial&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; LET vDateNewUpdate = MonthStart(AddMonths(Today(),0)); //Fecha desde donde se hace la nueva carga&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDIF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A03:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[..\FACTURACION_DETALLADA_CON_PAQUETE_EXT.qvd] (qvd)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Date(fecha_factura) &amp;lt;= $(vDateUpdate);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first part works fine, but now when i load the QVD to compare with the date the result is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 20:12:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303591#M1179662</guid>
      <dc:creator>julruiz123</dc:creator>
      <dc:date>2012-01-24T20:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to get the day from date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303592#M1179663</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;vDateUpdate is a literal, so you need to use single quotes to match the format returned by the Date() function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Where Date(fecha_factura) &amp;lt;= '$(vDateUpdate)';&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 20:22:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303592#M1179663</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-01-24T20:22:07Z</dc:date>
    </item>
    <item>
      <title>Problem to get the day from date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303593#M1179664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! Miguel Angel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 22:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-get-the-day-from-date/m-p/303593#M1179664</guid>
      <dc:creator>julruiz123</dc:creator>
      <dc:date>2012-01-24T22:24:36Z</dc:date>
    </item>
  </channel>
</rss>

