<?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 Read SQL date which is in text format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Read-SQL-date-which-is-in-text-format/m-p/723015#M224292</link>
    <description>&lt;P&gt;I have SQL date time field that downloaded as text field.&lt;BR /&gt;03/01/2021 11:35&lt;BR /&gt;used the following code to read..&lt;BR /&gt;input(trans_Date,anydtdtm.) as Date_Transfered format=dtdate9.,&lt;BR /&gt;but when I try to query the data :&lt;/P&gt;
&lt;P&gt;where Date_Transfered &amp;gt;= '01MAR2021'd; where clause is not working and it's pulling all the observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What did I miss?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Tue, 02 Mar 2021 22:55:58 GMT</pubDate>
    <dc:creator>Stalk</dc:creator>
    <dc:date>2021-03-02T22:55:58Z</dc:date>
    <item>
      <title>Read SQL date which is in text format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-SQL-date-which-is-in-text-format/m-p/723015#M224292</link>
      <description>&lt;P&gt;I have SQL date time field that downloaded as text field.&lt;BR /&gt;03/01/2021 11:35&lt;BR /&gt;used the following code to read..&lt;BR /&gt;input(trans_Date,anydtdtm.) as Date_Transfered format=dtdate9.,&lt;BR /&gt;but when I try to query the data :&lt;/P&gt;
&lt;P&gt;where Date_Transfered &amp;gt;= '01MAR2021'd; where clause is not working and it's pulling all the observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What did I miss?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 22:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-SQL-date-which-is-in-text-format/m-p/723015#M224292</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2021-03-02T22:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Read SQL date which is in text format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-SQL-date-which-is-in-text-format/m-p/723022#M224298</link>
      <description>&lt;P&gt;You do a god jobs of transforming the string into a datetime.&lt;/P&gt;
&lt;P&gt;That means you must filter on a datetime value:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;datepart(DATE_TRANSFERED) &amp;gt;= '01MAR2021'd;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;or (better)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;DATE_TRANSFERED &amp;gt;= '01MAR2021:00:00:00'dt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hint: look at the unformatted values when in doubt.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 23:10:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-SQL-date-which-is-in-text-format/m-p/723022#M224298</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-02T23:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Read SQL date which is in text format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-SQL-date-which-is-in-text-format/m-p/723036#M224306</link>
      <description>Thank you. It works.</description>
      <pubDate>Tue, 02 Mar 2021 23:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-SQL-date-which-is-in-text-format/m-p/723036#M224306</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2021-03-02T23:56:33Z</dc:date>
    </item>
  </channel>
</rss>

