<?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 Help with Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/390433#M696488</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to load a date value in a script based on whether one date value is null or not. The one date value is in a delimiter string. It is loaded with the following command in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subfield("char_fld",';',5) AS so_user_Promise_date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other date field is always populate. It is loaded int he script as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"ship_date" AS so_ship_date,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I the use the following load function to create a date field with either so_user_Promise_date or so_ship_date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *, &lt;/P&gt;&lt;P&gt;schedule_qty*so_unit_price AS so_total,&lt;/P&gt;&lt;P&gt;so_open_qty*so_unit_price AS so_total_open,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Trim([so_user_Promise_date]))=0,so_ship_date,so_user_Promise_date) AS so_promise_date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;RESIDENT sols;&lt;/P&gt;&lt;P&gt;drop table sols;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is so_promise_date display correctly if so_user_Promise_date is loaded. If so_ship_date is loaded I get the numeric value of the date. Example 41390. I have tried MakeDate, Date# with no luck. How can I get so_promise_date to always display the date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Apr 2013 12:54:39 GMT</pubDate>
    <dc:creator>dthornburg</dc:creator>
    <dc:date>2013-04-23T12:54:39Z</dc:date>
    <item>
      <title>Help with Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/390433#M696488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to load a date value in a script based on whether one date value is null or not. The one date value is in a delimiter string. It is loaded with the following command in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subfield("char_fld",';',5) AS so_user_Promise_date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other date field is always populate. It is loaded int he script as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"ship_date" AS so_ship_date,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I the use the following load function to create a date field with either so_user_Promise_date or so_ship_date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *, &lt;/P&gt;&lt;P&gt;schedule_qty*so_unit_price AS so_total,&lt;/P&gt;&lt;P&gt;so_open_qty*so_unit_price AS so_total_open,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Trim([so_user_Promise_date]))=0,so_ship_date,so_user_Promise_date) AS so_promise_date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;RESIDENT sols;&lt;/P&gt;&lt;P&gt;drop table sols;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is so_promise_date display correctly if so_user_Promise_date is loaded. If so_ship_date is loaded I get the numeric value of the date. Example 41390. I have tried MakeDate, Date# with no luck. How can I get so_promise_date to always display the date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 12:54:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/390433#M696488</guid>
      <dc:creator>dthornburg</dc:creator>
      <dc:date>2013-04-23T12:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/390434#M696489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;so_ship_date&lt;/EM&gt; is a correct date, &lt;EM&gt;so_user_Promise_date&lt;/EM&gt; is a string. You should use the date# function on &lt;EM&gt;so_user_Promise_date&lt;/EM&gt; to make a date of it. Once you've done that you can format so_promise_date in charts so it shows in a date format. If you want you can also do that in the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;STRONG&gt;date(If(Len(Trim([so_user_Promise_date]))=0,so_ship_date,date#(so_user_Promise_date,'DD-MM-YYYY')),'DD-MM-YYYY') AS so_promise_date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;change the first DD-MM-YYYY with the date format that the string field &lt;EM&gt;so_user_Promise_date&lt;/EM&gt; has. Change the second to however you want your dates displayed.&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 13:13:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/390434#M696489</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-23T13:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/390435#M696490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You. That combination worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 13:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/390435#M696490</guid>
      <dc:creator>dthornburg</dc:creator>
      <dc:date>2013-04-23T13:25:38Z</dc:date>
    </item>
  </channel>
</rss>

