<?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: Formatting date in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784495#M81297</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is 'Z'?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _NULL_;
 a="2012-07-07T20:44:30.293Z";
 b=input(scan(a,1,'T'),YYMMDD10.); put b= date9.;
 c=input(compress(scan(a,2,'T'),'Z'),time12.3); put c= time12.3;
 d=b*24*60*60 + c; put d= datetime22.3;
run;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Tue, 07 Dec 2021 10:38:27 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2021-12-07T10:38:27Z</dc:date>
    <item>
      <title>Formatting date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784479#M81296</link>
      <description>Hi all,&lt;BR /&gt;I've a character value which is like "2012-07-07T20:44:30.293Z". I would like to change this format to datetime&lt;BR /&gt;Required : 2012-07-07T20:44:30.293Z&lt;BR /&gt;Thanks.</description>
      <pubDate>Tue, 07 Dec 2021 07:19:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784479#M81296</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-07T07:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784495#M81297</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is 'Z'?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _NULL_;
 a="2012-07-07T20:44:30.293Z";
 b=input(scan(a,1,'T'),YYMMDD10.); put b= date9.;
 c=input(compress(scan(a,2,'T'),'Z'),time12.3); put c= time12.3;
 d=b*24*60*60 + c; put d= datetime22.3;
run;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 10:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784495#M81297</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-12-07T10:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784497#M81298</link>
      <description>Z refers to ZULU</description>
      <pubDate>Tue, 07 Dec 2021 10:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784497#M81298</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-07T10:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784499#M81299</link>
      <description>&lt;P&gt;I think "Z" means "Zulu Time", which is short for &lt;A href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time#Time_zones?wprov=sfla1" target="_blank" rel="noopener"&gt;Coordinated Universal Time&lt;/A&gt;, or what is commonly known as GMT.&lt;/P&gt;
&lt;P&gt;So simply discarding it will be OK.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 10:46:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784499#M81299</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-07T10:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784582#M81300</link>
      <description>&lt;P&gt;That's an ISO date and there should be informats to handle it directly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/n09tmeo4t9edo2n145twyoew1txu.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/n09tmeo4t9edo2n145twyoew1txu.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo;
 a="2012-07-07T20:44:30.293Z";
 b=input(a, B8601DZ.);
 format b B8601DZ.;
run;

proc print;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/405593"&gt;@Pandu2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi all,&lt;BR /&gt;I've a character value which is like "2012-07-07T20:44:30.293Z". I would like to change this format to datetime&lt;BR /&gt;Required : 2012-07-07T20:44:30.293Z&lt;BR /&gt;Thanks.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 17:55:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784582#M81300</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-07T17:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784597#M81301</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;: thanks for learning me something new.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/405593"&gt;@Pandu2&lt;/a&gt;&amp;nbsp;: sorry for my earlier reply which was of little or no use to you.&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 18:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/784597#M81301</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-12-07T18:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/785104#M81316</link>
      <description>&lt;P&gt;I would rather use the extended ISO 8601 formats/informats:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo;
 a="2012-07-07T20:44:30.293Z";
 b=input(a,e8601DZ.);
 format b e8601DZ.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Dec 2021 08:41:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Formatting-date/m-p/785104#M81316</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-09T08:41:26Z</dc:date>
    </item>
  </channel>
</rss>

