<?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 how to read mdyampm. dates (09/22/2015 20:15:32 AM) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-mdyampm-dates-09-22-2015-20-15-32-AM/m-p/231467#M42090</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have following&amp;nbsp; csv data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;sample data&amp;amp;colon;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;id,created_date,modified_date&lt;/P&gt;
&lt;P&gt;1021,12/23/2014 12:12:37 AM,9/21/2015 09:56:02 AM&lt;/P&gt;
&lt;P&gt;1024,09/12/2015&amp;nbsp; 04:24:00 PM,10/21/2015 11:44:03 AM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I have code:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA sample;&lt;/P&gt;
&lt;P&gt;INFILE &amp;nbsp; '/path/file' dsd dlm=',' firstobs=2 ;&lt;/P&gt;
&lt;P&gt;ATTRIB&lt;/P&gt;
&lt;P&gt;id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; informat = $5. format=$5.;&lt;/P&gt;
&lt;P&gt;created_date &amp;nbsp; informat=mdyampm.&amp;nbsp; format=mdyampm. &lt;/P&gt;
&lt;P&gt;modified_date&amp;nbsp; informat=mdyampm.&amp;nbsp; format=mdyampm. ;&lt;/P&gt;
&lt;P&gt;INPUT id $ created_date Modified_date;&lt;/P&gt;
&lt;P&gt;;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in My out put I am getting values for date variables like&amp;nbsp; 9/21/2015 09:56:02 AM.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;How Can I get dates like 9/21/2015 21:56:02&amp;nbsp; or&amp;nbsp; datestamp (24 hours format without AM, PM). What is the right format I need to use for dates.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Thank you&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Oct 2015 00:20:11 GMT</pubDate>
    <dc:creator>nbonda</dc:creator>
    <dc:date>2015-10-24T00:20:11Z</dc:date>
    <item>
      <title>how to read mdyampm. dates (09/22/2015 20:15:32 AM)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-mdyampm-dates-09-22-2015-20-15-32-AM/m-p/231467#M42090</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have following&amp;nbsp; csv data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;sample data&amp;amp;colon;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;id,created_date,modified_date&lt;/P&gt;
&lt;P&gt;1021,12/23/2014 12:12:37 AM,9/21/2015 09:56:02 AM&lt;/P&gt;
&lt;P&gt;1024,09/12/2015&amp;nbsp; 04:24:00 PM,10/21/2015 11:44:03 AM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I have code:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA sample;&lt;/P&gt;
&lt;P&gt;INFILE &amp;nbsp; '/path/file' dsd dlm=',' firstobs=2 ;&lt;/P&gt;
&lt;P&gt;ATTRIB&lt;/P&gt;
&lt;P&gt;id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; informat = $5. format=$5.;&lt;/P&gt;
&lt;P&gt;created_date &amp;nbsp; informat=mdyampm.&amp;nbsp; format=mdyampm. &lt;/P&gt;
&lt;P&gt;modified_date&amp;nbsp; informat=mdyampm.&amp;nbsp; format=mdyampm. ;&lt;/P&gt;
&lt;P&gt;INPUT id $ created_date Modified_date;&lt;/P&gt;
&lt;P&gt;;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in My out put I am getting values for date variables like&amp;nbsp; 9/21/2015 09:56:02 AM.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;How Can I get dates like 9/21/2015 21:56:02&amp;nbsp; or&amp;nbsp; datestamp (24 hours format without AM, PM). What is the right format I need to use for dates.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Thank you&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2015 00:20:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-mdyampm-dates-09-22-2015-20-15-32-AM/m-p/231467#M42090</guid>
      <dc:creator>nbonda</dc:creator>
      <dc:date>2015-10-24T00:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to read mdyampm. dates (09/22/2015 20:15:32 AM)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-mdyampm-dates-09-22-2015-20-15-32-AM/m-p/231469#M42092</link>
      <description>&lt;P&gt;This is a duplicate of this post&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/how-to-read-mdyampm-dates-09-22-2015-20-15-32-AM/m-p/231468#U23146" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/how-to-read-mdyampm-dates-09-22-2015-20-15-32-AM/m-p/231468#U23146&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please delete it and ask your question only once in a single forum.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2015 00:24:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-mdyampm-dates-09-22-2015-20-15-32-AM/m-p/231469#M42092</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-10-24T00:24:09Z</dc:date>
    </item>
  </channel>
</rss>

