<?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: How to convert the variable named Time='11:51:25 AM' into internal SAS date? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815338#M321824</link>
    <description>&lt;P&gt;A date requires year, month and day and has no time information, so it is not possible at all. You could convert the string value to a sas time value, as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; has already shown, or to a datetime with any date you want, &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="de" data-phrase-index="0" data-number-of-phrases="1"&gt;&lt;SPAN class="Q4iAWc"&gt;but that seems pretty pointless&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
    <pubDate>Fri, 27 May 2022 05:17:44 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2022-05-27T05:17:44Z</dc:date>
    <item>
      <title>How to convert the variable named Time='11:51:25 AM' into internal SAS date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815317#M321813</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks very much for your help in advance.&lt;BR /&gt;&amp;nbsp;Ethan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 22:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815317#M321813</guid>
      <dc:creator>t75wez1</dc:creator>
      <dc:date>2022-05-26T22:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the variable named Time='11:51:25 AM' into internal SAS date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815318#M321814</link>
      <description>&lt;P&gt;Since you don't show any DATE information, i.e. year, month or day of the month. Where would date information come from?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create a TIME value:&lt;/P&gt;
&lt;PRE&gt;data example;
   x='11:51:25 AM' ;
   timevariable = input(x,time11.);
   format timevariable timeampm.;
run;&lt;/PRE&gt;
&lt;P&gt;You could assign any of the time formats for display purposes.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 22:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815318#M321814</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-05-26T22:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the variable named Time='11:51:25 AM' into internal SAS date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815338#M321824</link>
      <description>&lt;P&gt;A date requires year, month and day and has no time information, so it is not possible at all. You could convert the string value to a sas time value, as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; has already shown, or to a datetime with any date you want, &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="de" data-phrase-index="0" data-number-of-phrases="1"&gt;&lt;SPAN class="Q4iAWc"&gt;but that seems pretty pointless&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 05:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815338#M321824</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-05-27T05:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the variable named Time='11:51:25 AM' into internal SAS date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815746#M321969</link>
      <description>&lt;P&gt;Thanks for the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got&amp;nbsp;time= substr(date,12,11) from&amp;nbsp;date='05/25/2022 11:51:25 AM'&lt;/P&gt;&lt;P&gt;so the question become how to convert the variable named date='05/25/2022 11:51:25 AM' into internal SAS date.&lt;/P&gt;&lt;PRE&gt; timevariable = input(date,?);&lt;/PRE&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>Mon, 30 May 2022 23:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815746#M321969</guid>
      <dc:creator>t75wez1</dc:creator>
      <dc:date>2022-05-30T23:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the variable named Time='11:51:25 AM' into internal SAS date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815749#M321972</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  date = '05/25/2022 11:51:25 AM';
  SAS_Date = input(substr(date, 1, 10), mmddyy10.);
  format SAS_Date date9.;
  put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 May 2022 00:05:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-variable-named-Time-11-51-25-AM-into-internal/m-p/815749#M321972</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-05-31T00:05:17Z</dc:date>
    </item>
  </channel>
</rss>

