<?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 AM PM in 24 hrs format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/AM-PM-in-24-hrs-format/m-p/571557#M161229</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Hi Guys ,&lt;BR /&gt;I below dataset not read am pm timings for 24 hrs format and i want difference b/w  arrival and departure&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data trn;
input station code$	station name $	route number	arrival time	departure time	distance ;
datalines;
shm	shalimar	1	--	16:05	0
src	santragachi jn	1	16:16	16:18	6
kgp	kharagpur jn	1	17:50	17:55	113
bls	balasore	1	19:18	19:20	232
ctc	cuttack	1	22:03	22:08	409
bbs	bhubaneswar	1	22:50	22:55	437
kur	khurda road jn	1	23:25	23:35	456
bam	brahmapur	1	01:25	01:30	603
che	srikakulam road	1	03:28	03:30	750
vzm	vizianagram jn	1	04:28	04:30	819
vskp	visakhapatnam	1	05:35	05:55	880
slo	samalkot jn	1	07:59	08:00	1030
rjy	rajahmundry	1	08:52	08:54	1080
bza	vijayawada jn	1	11:20	11:40	1229
wl	warangal	1	14:39	14:40	1437
sc	secunderabad jn	1	18:30	--	1578
;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 06 Jul 2019 08:45:36 GMT</pubDate>
    <dc:creator>BrahmanandaRao</dc:creator>
    <dc:date>2019-07-06T08:45:36Z</dc:date>
    <item>
      <title>AM PM in 24 hrs format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AM-PM-in-24-hrs-format/m-p/571557#M161229</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Hi Guys ,&lt;BR /&gt;I below dataset not read am pm timings for 24 hrs format and i want difference b/w  arrival and departure&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data trn;
input station code$	station name $	route number	arrival time	departure time	distance ;
datalines;
shm	shalimar	1	--	16:05	0
src	santragachi jn	1	16:16	16:18	6
kgp	kharagpur jn	1	17:50	17:55	113
bls	balasore	1	19:18	19:20	232
ctc	cuttack	1	22:03	22:08	409
bbs	bhubaneswar	1	22:50	22:55	437
kur	khurda road jn	1	23:25	23:35	456
bam	brahmapur	1	01:25	01:30	603
che	srikakulam road	1	03:28	03:30	750
vzm	vizianagram jn	1	04:28	04:30	819
vskp	visakhapatnam	1	05:35	05:55	880
slo	samalkot jn	1	07:59	08:00	1030
rjy	rajahmundry	1	08:52	08:54	1080
bza	vijayawada jn	1	11:20	11:40	1229
wl	warangal	1	14:39	14:40	1437
sc	secunderabad jn	1	18:30	--	1578
;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 06 Jul 2019 08:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AM-PM-in-24-hrs-format/m-p/571557#M161229</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2019-07-06T08:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: AM PM in 24 hrs format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AM-PM-in-24-hrs-format/m-p/571559#M161231</link>
      <description>&lt;P&gt;You need to use appropriate time informats when reading the data so SAS converts the source strings to SAS time values. This allows you to then use these values for calculations.&lt;/P&gt;
&lt;P&gt;You also need to apply the appropriate time formats so when printing the values they become human readable.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo;
  input arrival_time :time. departure_time :time.;
  format arrival_time departure_time travel_time hhmm5.;
  travel_time=departure_time-arrival_time;
  datalines;
16:05 20:55
04:05 20:55
;
proc print data=demo;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you don't understand yet how SAS Date, DateTime and Time values work then read the following:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p1wj0wt2ebe2a0n1lv4lem9hdc0v.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p1wj0wt2ebe2a0n1lv4lem9hdc0v.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2019 09:27:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AM-PM-in-24-hrs-format/m-p/571559#M161231</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-07-06T09:27:40Z</dc:date>
    </item>
  </channel>
</rss>

