<?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: extracting year, month, day and time form sql load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534196#M690510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! I think this will do the trick.&lt;/P&gt;&lt;P&gt;Do you know know how to extract the time also?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Oct 2013 13:36:19 GMT</pubDate>
    <dc:creator>dickelsa</dc:creator>
    <dc:date>2013-10-09T13:36:19Z</dc:date>
    <item>
      <title>extracting year, month, day and time form sql load script</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534193#M690507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hi all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I am currently working on something with an script that loads data from an SQL server. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;here is a part of the code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;OLEDB CONNECT TO [sql script id];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;SQL SELECT * FROM QV1.dbo."newbase_task_template_line_v";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;SQL SELECT * FROM QV1.dbo."newbase_holding_v";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;SQL SELECT * FROM QV1.dbo."newbase_ticket_strip_v";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;SQL SELECT * FROM QV1.dbo."newbase_hrm_header_v";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;SQL SELECT * FROM QV1.dbo."newbase_time_registration_v";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Now, when the script loads the data, it çreates fields for the data in above standing files.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;For example, the file named newbase_time_registration has fields : 'start time'; 'end time'; 'ammount of hours spent'; etc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The time and date however are not listed in fields 'month', 'year', 'week', 'day' but are all standing in one field combined.&lt;/P&gt;&lt;P&gt;This is very annoying because then you would get a field value that looks like this:&lt;/P&gt;&lt;P&gt;Fri May 18 2012 00:00:00 GMT+0200 (CEST)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: how do I extract the month, day, time and year from this?&lt;/P&gt;&lt;P&gt;normally you can put &lt;/P&gt;&lt;P&gt;Year('date')=Year&lt;/P&gt;&lt;P&gt;but since you cannot see the field headers in the script, it seems a little harder than that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions? please let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regard&lt;/P&gt;&lt;P&gt;Dick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 12:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534193#M690507</guid>
      <dc:creator>dickelsa</dc:creator>
      <dc:date>2013-10-09T12:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: extracting year, month, day and time form sql load script</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534194#M690508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to know the field names to be able to process them further. Once you know those you can use preceding loads the create the extra fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; year([start date]) as Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; month([start date] as Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; day([start date]) as Day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;...etc for other dates&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;load *,&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date#(mid([start time],5,11),'MMM DD YYYY') as [start date]; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; time#(&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;mid([start time],17,8),'hh:mm:ss') as [start time];&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; .&lt;EM&gt;.. etc for other dates&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SQL SELECT * FROM QV1.dbo."newbase_time_registration_v";&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 13:11:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534194#M690508</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-10-09T13:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: extracting year, month, day and time form sql load script</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534195#M690509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can consider Date from now then you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Date(Today()) as DateField&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 13:12:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534195#M690509</guid>
      <dc:creator>saumyashah90</dc:creator>
      <dc:date>2013-10-09T13:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: extracting year, month, day and time form sql load script</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534196#M690510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! I think this will do the trick.&lt;/P&gt;&lt;P&gt;Do you know know how to extract the time also?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 13:36:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534196#M690510</guid>
      <dc:creator>dickelsa</dc:creator>
      <dc:date>2013-10-09T13:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: extracting year, month, day and time form sql load script</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534197#M690511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look again &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #ffffee;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #ffffee;"&gt;time#(&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000; background-color: #ffffee;"&gt;mid([start time],17,8),'hh:mm:ss') as [start time];&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 13:43:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534197#M690511</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-10-09T13:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: extracting year, month, day and time form sql load script</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534198#M690512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;o sorry, I missed that, shame on me &lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 13:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534198#M690512</guid>
      <dc:creator>dickelsa</dc:creator>
      <dc:date>2013-10-09T13:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: extracting year, month, day and time form sql load script</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534199#M690513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it does not work actually..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 09:00:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-year-month-day-and-time-form-sql-load-script/m-p/534199#M690513</guid>
      <dc:creator>dickelsa</dc:creator>
      <dc:date>2013-10-18T09:00:11Z</dc:date>
    </item>
  </channel>
</rss>

