<?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: Convert DateTime format to Date only in Editor in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831340#M1214558</link>
    <description>&lt;P&gt;Load *, DayName(alert_date) as AlertDATE, Date(Floor(alert_date)) as AnotherAlertDATE;&lt;/P&gt;&lt;P&gt;SELECT alert_date, OtherFields&lt;/P&gt;&lt;P&gt;From YourTable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This assumes your date is actually a date field, rather than a string that happens to be formatted as a date. If the latter is the case, you'll need to use date#() to convert it to a date format first, and then apply one of the other function(s).&lt;/P&gt;</description>
    <pubDate>Thu, 26 Aug 2021 10:11:55 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2021-08-26T10:11:55Z</dc:date>
    <item>
      <title>Convert DateTime format to Date only in Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831334#M1214557</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to convert DateTime&amp;nbsp; (2021-01-01 12:18:23) obtained from SQL connection (SSMS) to Date (2021-01-01) only in the script editor.&lt;BR /&gt;&lt;BR /&gt;Tried many proposals from the Forum with no luck. Reverting to the below - but this is not a perfect solution and causes issues elsewhere in the build -&lt;/P&gt;&lt;P&gt;Trying to convert a.alert_date to just Date (as above)&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO SSMS;&lt;BR /&gt;SELECT 'WLF Batch' as queue_summary&lt;BR /&gt;,Left(a.alert_date,10) as "AlertDATE"&lt;BR /&gt;,Day(a.alert_date) as "Alert_day"&lt;BR /&gt;,Month(a.alert_date) as "Alert_month"&lt;BR /&gt;,Year(a.alert_date) as "Alert_year"&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 09:57:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831334#M1214557</guid>
      <dc:creator>DirkCtz</dc:creator>
      <dc:date>2021-08-26T09:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert DateTime format to Date only in Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831340#M1214558</link>
      <description>&lt;P&gt;Load *, DayName(alert_date) as AlertDATE, Date(Floor(alert_date)) as AnotherAlertDATE;&lt;/P&gt;&lt;P&gt;SELECT alert_date, OtherFields&lt;/P&gt;&lt;P&gt;From YourTable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This assumes your date is actually a date field, rather than a string that happens to be formatted as a date. If the latter is the case, you'll need to use date#() to convert it to a date format first, and then apply one of the other function(s).&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 10:11:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831340#M1214558</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-08-26T10:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert DateTime format to Date only in Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831358#M1214560</link>
      <description>&lt;P&gt;Thank you for the response. I'm not getting it to work though...&lt;/P&gt;&lt;P&gt;Please could you check this out for me and advise?&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO SSMS;&lt;/P&gt;&lt;P&gt;Load *,&lt;BR /&gt;DayName(a.alert_date) as AlertDATE,&lt;BR /&gt;Date(Floor(a.alert_date)) as AnotherAlertDATE;&lt;/P&gt;&lt;P&gt;SELECT&amp;nbsp;&lt;BR /&gt;a.alert_date&lt;BR /&gt;,Left(a.alert_date,10) as "AlertDATELeft"&lt;BR /&gt;,Day(a.alert_date) as "Alert_day"&lt;BR /&gt;,Month(a.alert_date) as "Alert_month"&lt;BR /&gt;,Year(a.alert_date) as "Alert_year"&lt;/P&gt;&lt;P&gt;FROM&amp;nbsp;Table1 a&lt;BR /&gt;LEFT JOIN Table2 b ON a.ID = b.ID&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 11:41:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831358#M1214560</guid>
      <dc:creator>DirkCtz</dc:creator>
      <dc:date>2021-08-26T11:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Convert DateTime format to Date only in Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831369#M1214562</link>
      <description>&lt;P&gt;Sorry, but I can't check this out for you - it's a query from your database that I don't have access to. What result are you getting, and what are sample input values?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 11:55:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831369#M1214562</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-08-26T11:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert DateTime format to Date only in Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831377#M1214563</link>
      <description>&lt;P&gt;Understood -&lt;BR /&gt;Is the construct of my query in order though?&lt;/P&gt;&lt;P&gt;a.alert_date is in format&amp;nbsp;&lt;SPAN&gt;2021-01-01 12:18:23&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 12:21:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831377#M1214563</guid>
      <dc:creator>DirkCtz</dc:creator>
      <dc:date>2021-08-26T12:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert DateTime format to Date only in Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831379#M1214564</link>
      <description>&lt;P&gt;Try Dayname(date#(alert_date,'YYYY-MM-DD hh:mm:ss')) - if Qlik isn't reading it as a date, this should force it to do so.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 12:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-DateTime-format-to-Date-only-in-Editor/m-p/1831379#M1214564</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-08-26T12:24:10Z</dc:date>
    </item>
  </channel>
</rss>

