<?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: Data Manipulation inside Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443765#M165463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the networkdays works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the main problem is the string "date(date#(DateField,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY')as NewDate"&lt;/P&gt;&lt;P&gt;that doesn't work and I don't know why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrong to copy "Resident Table_from_the_system is wrong" the correct string is "Resident Table1"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2012 12:41:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-23T12:41:54Z</dc:date>
    <item>
      <title>Data Manipulation inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443763#M165461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have several issues to resolve. I need to:&lt;/P&gt;&lt;P&gt;1 convert string in date format in the load script&lt;/P&gt;&lt;P&gt;2 create two calculate field that are the difference in network days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the first isse a tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT DateField,&lt;/P&gt;&lt;P&gt;Position&lt;/P&gt;&lt;P&gt;Number&lt;/P&gt;&lt;P&gt;FROM Table_from_the_system;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Position,&lt;/P&gt;&lt;P&gt;Number,&lt;/P&gt;&lt;P&gt;date(date#(DateField,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY')as NewDate RESIDENT Table_from_the_system;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But doesn't work !! The NewDate field is Empty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( Datefield is a string )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 12:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443763#M165461</guid>
      <dc:creator />
      <dc:date>2012-10-23T12:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443764#M165462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;networkdays(Date1,Date2) returns the net number of workdays between Date1 and Dat2 (as long as they are dates and not strings).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check that the date format matches the format of the DateField string. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also you use &lt;STRONG&gt;resident Table_from_the_system&lt;/STRONG&gt;. But looking at your example don't you need &lt;STRONG&gt;resident Table1&lt;/STRONG&gt; instead?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 12:31:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443764#M165462</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-23T12:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443765#M165463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the networkdays works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the main problem is the string "date(date#(DateField,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY')as NewDate"&lt;/P&gt;&lt;P&gt;that doesn't work and I don't know why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrong to copy "Resident Table_from_the_system is wrong" the correct string is "Resident Table1"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 12:41:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443765#M165463</guid>
      <dc:creator />
      <dc:date>2012-10-23T12:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443766#M165464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd expect that the DateField in the database has date format already, so the syntax is:&lt;/P&gt;&lt;P&gt;date(DateField) as NewDate&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;date(floor(DateField)) as NewDate&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // to remove time part&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;date(floor(DateField), 'DD/MM/YYYY') as NewDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // to enforce format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is not a date field, you need to use date#() as well - make sure you got the format right in this case.&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>Tue, 23 Oct 2012 12:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443766#M165464</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-23T12:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443767#M165465</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; Did you try &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date(DateField,'DD/MM/YYYY') as NewField&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date(timestamp(DateField,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Am not sure why you use date#(), are you sure , its text format??&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 12:45:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443767#M165465</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-10-23T12:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443768#M165466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It Works !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the second solution, but isn't clear for me why works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do the timestamp function ?&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, 23 Oct 2012 13:12:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443768#M165466</guid>
      <dc:creator />
      <dc:date>2012-10-23T13:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443769#M165467</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;From help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;SPAN class="Bold"&gt;timestamp&lt;/SPAN&gt; function formats the &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; as a date and time according to the string given as &lt;SPAN class="Italic"&gt;format-code&lt;/SPAN&gt;. If the format code is omitted, the date and time formats set in the operating system are used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i think, from sql format is like DD/MM/YYYY hh:mm:ss format..so timestamp calculate the value exactly n give the result..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 13:20:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-Manipulation-inside-Load-Script/m-p/443769#M165467</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-10-23T13:20:45Z</dc:date>
    </item>
  </channel>
</rss>

