<?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 Issue with ANYDTDTM in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ANYDTDTM/m-p/652424#M195868</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I have Imported data from Excel file in which I have a column with both date and time &lt;STRONG&gt;Ex&lt;/STRONG&gt;: 05/09/2018 9:46. (dd/mm/yyyy hh:mm)&lt;/P&gt;&lt;P&gt;&amp;nbsp;- I am using ANYDTDTM. to convert it to datetime format and the code I am using is Below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input(coll_date_time,ANYDTDTM.) as erdttime format=datetime15.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Here, we have dates in the form of dd/mm/yyyy hh:mm and expectation from above piece of code&amp;nbsp;is 05SEP18:09:46.&amp;nbsp;However, above code is giving output as '09MAY2018:09:46'. It's considering day as month and Month as Day.&lt;/P&gt;&lt;P&gt;while the same code is giving correct Output for ''29/01/2019 10:40" as 29JAN19:10:40 (here its considering correctly when day is above 12) .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please provide what should I specify here to get correct output as required. Thanks for your support in advance. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jun 2020 04:08:28 GMT</pubDate>
    <dc:creator>Hari2</dc:creator>
    <dc:date>2020-06-02T04:08:28Z</dc:date>
    <item>
      <title>Issue with ANYDTDTM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ANYDTDTM/m-p/652424#M195868</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I have Imported data from Excel file in which I have a column with both date and time &lt;STRONG&gt;Ex&lt;/STRONG&gt;: 05/09/2018 9:46. (dd/mm/yyyy hh:mm)&lt;/P&gt;&lt;P&gt;&amp;nbsp;- I am using ANYDTDTM. to convert it to datetime format and the code I am using is Below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input(coll_date_time,ANYDTDTM.) as erdttime format=datetime15.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Here, we have dates in the form of dd/mm/yyyy hh:mm and expectation from above piece of code&amp;nbsp;is 05SEP18:09:46.&amp;nbsp;However, above code is giving output as '09MAY2018:09:46'. It's considering day as month and Month as Day.&lt;/P&gt;&lt;P&gt;while the same code is giving correct Output for ''29/01/2019 10:40" as 29JAN19:10:40 (here its considering correctly when day is above 12) .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please provide what should I specify here to get correct output as required. Thanks for your support in advance. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 04:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ANYDTDTM/m-p/652424#M195868</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2020-06-02T04:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ANYDTDTM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ANYDTDTM/m-p/652428#M195870</link>
      <description>&lt;P&gt;You need to properly set your&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lesysoptsref&amp;amp;docsetTarget=n0cmg3tjkn6zmbn1od6pna244zm7.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;DATESTYLE=&lt;/A&gt;&amp;nbsp;system option. Or you input date and time separately (use the SCAN() function to get the parts) and combine them with DHMS().&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 04:29:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ANYDTDTM/m-p/652428#M195870</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-02T04:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ANYDTDTM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ANYDTDTM/m-p/652450#M195880</link>
      <description>Thank you Sir.. I used DATESTYLE Option.. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Jun 2020 07:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ANYDTDTM/m-p/652450#M195880</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2020-06-02T07:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ANYDTDTM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ANYDTDTM/m-p/652496#M195901</link>
      <description>&lt;P&gt;Personally, I prefer to not use the "any" informats, as they might read something without ERROR that is in fact not correct. I try to force the correct informat as much as I can, so that I get alerted to data mistakes by a crashing import job (because I am responsible for ~1000 batch jobs, several hundred of which are pure import jobs, and I cannot check that manually).&lt;/P&gt;
&lt;P&gt;Some of those imports read data that was handled manually on the way, and must be considered unreliable and therefore checked for correctness as much as possible.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 11:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ANYDTDTM/m-p/652496#M195901</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-02T11:30:01Z</dc:date>
    </item>
  </channel>
</rss>

