<?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 WHERE select with date format in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240310#M90848</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The error occured is due to the foramt problem in your date/occured column,i think there is a problem with the date format of your database&lt;/P&gt;&lt;P&gt;See your date format will be enclosed in single quotes by default but here it is numeric in your where statement&lt;/P&gt;&lt;P&gt;So first check whether the datatype of the column is similar to the value used in condition ,In case if they are not similar&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;first convert your date to number .&lt;/P&gt;&lt;P&gt;i.e&lt;/P&gt;&lt;P&gt;ex: Where '14/05/2010 10:15:20 ' &amp;gt; 127008000 the output will be nothing in this case&lt;/P&gt;&lt;P&gt;so convert the date to number&lt;/P&gt;&lt;P&gt;where To_Number('14/05/2010 10:15:20 ' ) &amp;gt; 1270080000&lt;/P&gt;&lt;P&gt;try this hope you will find the solution during the processssssssssss&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 May 2010 05:07:34 GMT</pubDate>
    <dc:creator>spsrk_84</dc:creator>
    <dc:date>2010-05-14T05:07:34Z</dc:date>
    <item>
      <title>WHERE select with date format</title>
      <link>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240309#M90847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am having trouble getting my SELECT to work using a WHERE clause.&lt;/P&gt;&lt;P&gt;The format that Date/Time Occurred is coming into QV is in "YYYY-MM-DD HH:MM:SS.FFF"&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; "Date/Time Occurred",&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;date("Date/Time Occurred", 'YYYY-MM-DD') &lt;B&gt;as&lt;/B&gt; "DATE_OCCURRED", &lt;P&gt;TRIM(YEAR("Date/Time Occurred")) &lt;B&gt;as&lt;/B&gt; YEAR,&lt;/P&gt;&lt;P&gt;TRIM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(MONTH("Date/Time Occurred")) &lt;B&gt;as&lt;/B&gt; MONTH,&lt;/P&gt;&lt;P&gt;TRIM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(DAY("Date/Time Occurred")) &lt;B&gt;as&lt;/B&gt; DAY&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;B&gt;SQL&lt;/B&gt; &lt;B&gt;SELECT&lt;/B&gt; *&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM (table)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;WHERE "Date/Time Occurred" &amp;gt; 1270080000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error is:&lt;/P&gt;&lt;P&gt;SQP Error: [ODBC Driver] Data Types are not appropriate for relational operation...&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 20:58:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240309#M90847</guid>
      <dc:creator />
      <dc:date>2010-05-13T20:58:04Z</dc:date>
    </item>
    <item>
      <title>WHERE select with date format</title>
      <link>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240310#M90848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The error occured is due to the foramt problem in your date/occured column,i think there is a problem with the date format of your database&lt;/P&gt;&lt;P&gt;See your date format will be enclosed in single quotes by default but here it is numeric in your where statement&lt;/P&gt;&lt;P&gt;So first check whether the datatype of the column is similar to the value used in condition ,In case if they are not similar&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;first convert your date to number .&lt;/P&gt;&lt;P&gt;i.e&lt;/P&gt;&lt;P&gt;ex: Where '14/05/2010 10:15:20 ' &amp;gt; 127008000 the output will be nothing in this case&lt;/P&gt;&lt;P&gt;so convert the date to number&lt;/P&gt;&lt;P&gt;where To_Number('14/05/2010 10:15:20 ' ) &amp;gt; 1270080000&lt;/P&gt;&lt;P&gt;try this hope you will find the solution during the processssssssssss&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 05:07:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240310#M90848</guid>
      <dc:creator>spsrk_84</dc:creator>
      <dc:date>2010-05-14T05:07:34Z</dc:date>
    </item>
    <item>
      <title>WHERE select with date format</title>
      <link>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240311#M90849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The "Date/Time Occurred" field is coming into QV from an outside DB. It is in the format of M/D/YYYY h:mm:ss example of a date/time ocurred is :&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width:111pt;border-collapse:collapse;" width="148"&gt;&lt;COLGROUP&gt;&lt;COL style="width:111pt;mso-width-source:userset;mso-width-alt:5412;" width="148" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl77" height="17" style="width:111pt;height:12.75pt;background-color:transparent;border:#e0dfe3;" width="148"&gt;1/3/2010 8:39:10 PM&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The problem is trying to query between specific dates...ex Jan 1, 2010 to jan 30, 2010....&lt;/P&gt;&lt;P&gt;I have tried using epoch time, d/m/yyyy, timestamp format and all have returned the same error message.&lt;/P&gt;&lt;P&gt;examples of previously used WHERE..&lt;/P&gt;&lt;P&gt;WHERE "Date/Time Occurred" &amp;gt; '1/6/2010';&lt;/P&gt;&lt;P&gt;WHERE "Date/Time Occurred" &amp;gt; 1270080000;&lt;/P&gt;&lt;P&gt;WHERE "Date/Time Occurred" &amp;gt; '2010-01-01 0:00:00';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ajay, where did the To_Number field come from in your above example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 14:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240311#M90849</guid>
      <dc:creator />
      <dc:date>2010-05-14T14:15:17Z</dc:date>
    </item>
    <item>
      <title>WHERE select with date format</title>
      <link>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240312#M90850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your loading "Date/Time Occurred" as "DATE_OCCURRED" don't you want to say select Where "DATE_OCCURRED" &amp;gt; '1/6/2010'; just a thought.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 19:49:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240312#M90850</guid>
      <dc:creator />
      <dc:date>2010-05-14T19:49:17Z</dc:date>
    </item>
    <item>
      <title>WHERE select with date format</title>
      <link>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240313#M90851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nope, i've tried that too...it just seems wierd that i cannot select the datetime format any which way for this WHERE clause&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 13:02:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240313#M90851</guid>
      <dc:creator />
      <dc:date>2010-05-17T13:02:52Z</dc:date>
    </item>
    <item>
      <title>WHERE select with date format</title>
      <link>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240314#M90852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was connecting to the server using the wrong driver....a ODBC driver instead of an Oracle one, only 2 weeks into Qlikview. A co-worker pointed that out. Thanks for the suggestions though, greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 16:27:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WHERE-select-with-date-format/m-p/240314#M90852</guid>
      <dc:creator />
      <dc:date>2010-05-17T16:27:03Z</dc:date>
    </item>
  </channel>
</rss>

