<?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: Time format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Time-format/m-p/946453#M370646</link>
    <description>&lt;P&gt;Roll your own picture format with '%0I:%0M' (%I displays hour in 12-hour format).&lt;/P&gt;</description>
    <pubDate>Sun, 06 Oct 2024 19:06:32 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-10-06T19:06:32Z</dc:date>
    <item>
      <title>Time format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-format/m-p/946449#M370642</link>
      <description>&lt;P&gt;Hi everyone, I have challenge formating time.&lt;BR /&gt;I'm trying to create time format from time().&lt;BR /&gt;For example, I want it in 5:25(I don't want pm or am attached to time). What I'm getting is either 5:25pm and 17:25.&lt;BR /&gt;data _null_;&lt;/P&gt;
&lt;P&gt;call symputx('time', put(time, tod5.));&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;%put &amp;amp;=time;&lt;/P&gt;
&lt;P&gt;I have tried using time5. timeampm. as&amp;nbsp; well.&amp;nbsp;&lt;BR /&gt;None is working.&lt;BR /&gt;What can I do please?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2024 18:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-format/m-p/946449#M370642</guid>
      <dc:creator>PrinceAde</dc:creator>
      <dc:date>2024-10-06T18:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Time format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-format/m-p/946453#M370646</link>
      <description>&lt;P&gt;Roll your own picture format with '%0I:%0M' (%I displays hour in 12-hour format).&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2024 19:06:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-format/m-p/946453#M370646</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-10-06T19:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Time format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-format/m-p/946461#M370652</link>
      <description>&lt;P&gt;Since you seem to be putting the value into a macro variable just add more logic.&lt;/P&gt;
&lt;P&gt;Either after you have converted the time into a string.&lt;/P&gt;
&lt;PRE&gt;1    data _null_;
2      time='17:25't ;
3      call symputx('time', substr(put(time, timeampm.),1,5));
4    run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


5    %put &amp;amp;=time;
TIME=5:25
6
&lt;/PRE&gt;
&lt;P&gt;Or before&lt;/P&gt;
&lt;PRE&gt;7    data _null_;
8      time='17:25't ;
9      call symputx('time', put(mod(time,'12:00:00't), time5.));
10   run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


11   %put &amp;amp;=time;
TIME=5:25

&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Oct 2024 00:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-format/m-p/946461#M370652</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-10-07T00:26:27Z</dc:date>
    </item>
  </channel>
</rss>

