<?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: Converting a DATETIME field to DATE from SQL Source in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Converting-a-DATETIME-field-to-DATE-from-SQL-Source/m-p/1737757#M722494</link>
    <description>&lt;P&gt;The preceding load worked better in this situation as my weakness with SQL did not allow me to address some errors that appeared.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Errors were mainly syntax related.&lt;/P&gt;&lt;P&gt;Thank you both for your contributions and learning experience.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Aug 2020 12:44:40 GMT</pubDate>
    <dc:creator>gfisch13</dc:creator>
    <dc:date>2020-08-21T12:44:40Z</dc:date>
    <item>
      <title>Converting a DATETIME field to DATE from SQL Source</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-a-DATETIME-field-to-DATE-from-SQL-Source/m-p/1737548#M722491</link>
      <description>&lt;P&gt;Hi folks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to convert a DATETIME field to DATE.&amp;nbsp; The field I'm loading comes from and SQL Source using an SQL SELECT format in my script.&lt;/P&gt;&lt;P&gt;I've read several posts on this site and used a function that I thought would work but when I reload I'm getting an error that states 'date' is not a recognized SQL function.&amp;nbsp; &amp;nbsp;I'm open to learning any new ways to accomplish this task!&amp;nbsp; &amp;nbsp; Script Below:&lt;/P&gt;&lt;P&gt;VenMaster:&lt;BR /&gt;SQL SELECT "ACT_REC_IND",&lt;BR /&gt;"ADR_SEQ_NUM",&lt;BR /&gt;// "AUDT_ID",&lt;BR /&gt;"BNK_SET_A_ID",&lt;BR /&gt;"DATA_SRC_CD",&lt;BR /&gt;"EFF_DT",&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Date(Date(Left("EFF_DT",10),'MM/DD/YYYY')) as Date,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;// "ETL_CYC_DT",&lt;BR /&gt;// "ETL_UPDT_DT",&lt;BR /&gt;// "ETL_XTRCT_DT",&lt;BR /&gt;"VND_ADR_1_TXT",&lt;BR /&gt;"VND_ADR_2_TXT",&lt;BR /&gt;"VND_ADR_3_TXT",&lt;BR /&gt;"VND_ADR_4_TXT",&lt;BR /&gt;"VND_CITY_NM",&lt;BR /&gt;"VND_CLASS_CD",&lt;BR /&gt;"VND_DBA_NM",&lt;BR /&gt;"VND_ID",&lt;BR /&gt;"VND_NM",&lt;BR /&gt;"VND_PST_CD",&lt;BR /&gt;"VND_ADR_1_TXT" + ' ' + "VND_PST_CD" as AddressMatch,&lt;BR /&gt;"VND_ST_CD",&lt;BR /&gt;"VND_STTS_CD"&lt;BR /&gt;FROM "DMBA_SIU".dbo."T_APRV_VND_DTL_PRST";&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-a-DATETIME-field-to-DATE-from-SQL-Source/m-p/1737548#M722491</guid>
      <dc:creator>gfisch13</dc:creator>
      <dc:date>2024-11-16T00:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Converting a DATETIME field to DATE from SQL Source</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-a-DATETIME-field-to-DATE-from-SQL-Source/m-p/1737555#M722492</link>
      <description>&lt;P&gt;Try to use a preceding load. This way you get your data through SQL and can transform it with QlikView-Syntax and there's no need to use database specific SQL.&lt;/P&gt;&lt;P&gt;VenMaster:&lt;BR /&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;Date(Floor(EFF_DT) AS EFF_Date&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT "ACT_REC_IND",&lt;BR /&gt;"ADR_SEQ_NUM",&lt;BR /&gt;// "AUDT_ID",&lt;BR /&gt;"BNK_SET_A_ID",&lt;BR /&gt;"DATA_SRC_CD",&lt;BR /&gt;"EFF_DT",&lt;BR /&gt;// "ETL_CYC_DT",&lt;BR /&gt;// "ETL_UPDT_DT",&lt;BR /&gt;// "ETL_XTRCT_DT",&lt;BR /&gt;"VND_ADR_1_TXT",&lt;BR /&gt;"VND_ADR_2_TXT",&lt;BR /&gt;"VND_ADR_3_TXT",&lt;BR /&gt;"VND_ADR_4_TXT",&lt;BR /&gt;"VND_CITY_NM",&lt;BR /&gt;"VND_CLASS_CD",&lt;BR /&gt;"VND_DBA_NM",&lt;BR /&gt;"VND_ID",&lt;BR /&gt;"VND_NM",&lt;BR /&gt;"VND_PST_CD",&lt;BR /&gt;"VND_ADR_1_TXT" + ' ' + "VND_PST_CD" as AddressMatch,&lt;BR /&gt;"VND_ST_CD",&lt;BR /&gt;"VND_STTS_CD"&lt;BR /&gt;FROM "DMBA_SIU".dbo."T_APRV_VND_DTL_PRST";&lt;/P&gt;&lt;P&gt;Explanation of the transformation (if EFF_DAT is a timestamp field)&lt;BR /&gt;Floor(...) =&amp;gt; get rid of the hours, minutes,..., else you have in a listbox the date multiple times&lt;BR /&gt;Date(...) =&amp;gt; convert into a QlikView-Date&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 06:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-a-DATETIME-field-to-DATE-from-SQL-Source/m-p/1737555#M722492</guid>
      <dc:creator>peterwh</dc:creator>
      <dc:date>2020-08-21T06:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Converting a DATETIME field to DATE from SQL Source</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-a-DATETIME-field-to-DATE-from-SQL-Source/m-p/1737566#M722493</link>
      <description>&lt;P&gt;You are using Qlik native functions in SQL statement which will not work. You need to use functions which is supported by your source i.w native to Sql source. You can try something like below&lt;/P&gt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lt;BR /&gt;&lt;SPAN&gt;"VND_PST_CD",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"VND_ADR_1_TXT" + ' ' + "VND_PST_CD" as AddressMatch,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"VND_ST_CD",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"VND_STTS_CD"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FROM "DMBA_SIU".dbo."T_APRV_VND_DTL_PRST";&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 20:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-a-DATETIME-field-to-DATE-from-SQL-Source/m-p/1737566#M722493</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-20T20:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Converting a DATETIME field to DATE from SQL Source</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-a-DATETIME-field-to-DATE-from-SQL-Source/m-p/1737757#M722494</link>
      <description>&lt;P&gt;The preceding load worked better in this situation as my weakness with SQL did not allow me to address some errors that appeared.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Errors were mainly syntax related.&lt;/P&gt;&lt;P&gt;Thank you both for your contributions and learning experience.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 12:44:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-a-DATETIME-field-to-DATE-from-SQL-Source/m-p/1737757#M722494</guid>
      <dc:creator>gfisch13</dc:creator>
      <dc:date>2020-08-21T12:44:40Z</dc:date>
    </item>
  </channel>
</rss>

