<?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 do I create a time format from hhmmss formatted observations? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-a-time-format-from-hhmmss-formatted-observations/m-p/407404#M99272</link>
    <description>&lt;P&gt;You have to express those time values with the literal format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;
value militarytimeN
'00:00:00't - '01:00:00't ="12am-1am"
/* same for remaining values */
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But you might also want to explore what existing time formats and precision specifiers can do for you, perhaps saving the trouble of a new format.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2017 18:13:34 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2017-10-25T18:13:34Z</dc:date>
    <item>
      <title>How do I create a time format from hhmmss formatted observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-a-time-format-from-hhmmss-formatted-observations/m-p/407399#M99267</link>
      <description>&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;
value militarytimeN
00:00:00 - 01:00:00 ="12am-1am"
01:00:00-02:00:00="1am-2am"
02:00:00-03:00:00="2am-3am"
03:00:00-04:00:00="3am-4am"
04:00:00-05:00:00="4am-5am"
05:00:00-06:00:00="5am-6am"
06:00:00-07:00:00="6am-7am"
07:00:00-08:00:00="7am-8am"
08:00:00-09:00:00="8am-9am"
09:00:00-10:00:00="9am-10am"
10:00:00-11:00:00="10am-11am"
11:00:00-12:00:00="11am-12pm"
12:00:00-13:00:00="12pm-1pm"
13:00:00-14:00:00="1pm-2pm"
14:00:00-15:00:00="2pm-3pm"
15:00:00-16:00:00="3pm-4pm"
16:00:00-17:00:00="4pm-5pm"
17:00:00-18:00:00="5pm-6pm"
18:00:00-19:00:00="6pm-7pm"
19:00:00-20:00:00="7pm-8pm"
20:00:00-21:00:00="8pm-9pm"
21:00:00-22:00:00="9pm-10pm"
22:00:00-23:00:00="10pm-11pm"
23:00:00-24:00:00="11pm-11:59pm";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is my error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;

332 value militarytimeN

333 00:00:00 - 01:00:00 ="12am-1am"

- -

22 200

200

ERROR 22-322: Syntax error, expecting one of the following: (, ',', -, &amp;lt;, =.

ERROR 200-322: The symbol is not recognized and will be ignored.

333! 00:00:00 - 01:00:00 ="12am-1am"

-

22

ERROR 22-322: Syntax error, expecting one of the following: (, ',', =......&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Oct 2017 18:06:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-a-time-format-from-hhmmss-formatted-observations/m-p/407399#M99267</guid>
      <dc:creator>JamDOT</dc:creator>
      <dc:date>2017-10-25T18:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a time format from hhmmss formatted observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-a-time-format-from-hhmmss-formatted-observations/m-p/407404#M99272</link>
      <description>&lt;P&gt;You have to express those time values with the literal format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;
value militarytimeN
'00:00:00't - '01:00:00't ="12am-1am"
/* same for remaining values */
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But you might also want to explore what existing time formats and precision specifiers can do for you, perhaps saving the trouble of a new format.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 18:13:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-a-time-format-from-hhmmss-formatted-observations/m-p/407404#M99272</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-10-25T18:13:34Z</dc:date>
    </item>
  </channel>
</rss>

