<?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: SAS B8601DZ35. Format to Date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-B8601DZ35-Format-to-Date/m-p/476627#M122675</link>
    <description>&lt;P&gt;If you don't actually need the time part for anything consider:&lt;/P&gt;
&lt;PRE&gt;data test;
x = "2018-07-07T08:15:09.0325056-05:00";
y = input(x, yymmdd10.);
format y yymmdd10.;
run;&lt;/PRE&gt;</description>
    <pubDate>Mon, 09 Jul 2018 22:37:41 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-07-09T22:37:41Z</dc:date>
    <item>
      <title>SAS B8601DZ35. Format to Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-B8601DZ35-Format-to-Date/m-p/476188#M122509</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just downloaded a file where I have the date with time in the format&amp;nbsp;B8601DZ35.&amp;nbsp; (variable name date_time)&lt;/P&gt;&lt;P&gt;The problem now is that I cannot really work with it. What I need is the date format as YYMMDD10.&amp;nbsp; (Year-month-day) and the time as&amp;nbsp;Hour:Minute:Second:Millisecond&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function year=year(date_time) etc but does not work.&lt;/P&gt;&lt;P&gt;I also tried :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want; set have;&lt;BR /&gt;format date_time datetime26.;&lt;BR /&gt;put _all_ ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also no effect.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I extract the individual values of the variable?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 05:49:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-B8601DZ35-Format-to-Date/m-p/476188#M122509</guid>
      <dc:creator>MarcBoh</dc:creator>
      <dc:date>2018-07-07T05:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS B8601DZ35. Format to Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-B8601DZ35-Format-to-Date/m-p/476189#M122510</link>
      <description>&lt;P&gt;Something like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
x = "2018-07-07T08:15:09.0325056-05:00";
y = input(x, B8601DZ35.);
format y datetime26.;
put _all_ ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Jul 2018 06:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-B8601DZ35-Format-to-Date/m-p/476189#M122510</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-07T06:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS B8601DZ35. Format to Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-B8601DZ35-Format-to-Date/m-p/476191#M122511</link>
      <description>&lt;P&gt;Thanks Draycut.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made it though with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;	 date = datepart(date_time);
 	    format date mmddyy10.;
  	 time = timepart(date_time);&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 06:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-B8601DZ35-Format-to-Date/m-p/476191#M122511</guid>
      <dc:creator>MarcBoh</dc:creator>
      <dc:date>2018-07-07T06:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS B8601DZ35. Format to Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-B8601DZ35-Format-to-Date/m-p/476627#M122675</link>
      <description>&lt;P&gt;If you don't actually need the time part for anything consider:&lt;/P&gt;
&lt;PRE&gt;data test;
x = "2018-07-07T08:15:09.0325056-05:00";
y = input(x, yymmdd10.);
format y yymmdd10.;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jul 2018 22:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-B8601DZ35-Format-to-Date/m-p/476627#M122675</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-09T22:37:41Z</dc:date>
    </item>
  </channel>
</rss>

