<?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 to -&amp;gt; Convert  Variable Format From Datetime to Character Without Changing View of Variab in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-gt-Convert-Variable-Format-From-Datetime-to-Character/m-p/311447#M67309</link>
    <description>&lt;P&gt;Hi turcay,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The put function should do this for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Have;
Length Numeric 8;
Infile Datalines Missover;
Input Numeric ;
Format Numeric DATETIME27.6;
Datalines;
201001
201002
201003
201004
201005
201006
201007
201008
201009
201010
201011
201012
;
Run;

data want;
set have;
char = put(numeric,DATETIME27.6);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 14 Nov 2016 16:28:32 GMT</pubDate>
    <dc:creator>BenbowL</dc:creator>
    <dc:date>2016-11-14T16:28:32Z</dc:date>
    <item>
      <title>How to -&gt; Convert  Variable Format From Datetime to Character Without Changing View of Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-gt-Convert-Variable-Format-From-Datetime-to-Character/m-p/311416#M67296</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a sample code as below, I try to see datetime27.6 format being a character format. I mean, I want to convert the format of variable but not convert view of variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my sample code and desired output. Can somebody help me, please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*Sample data*/
Data Have;
Length Numeric 8;
Infile Datalines Missover;
Input Numeric ;
Format Numeric DATETIME27.6;
Datalines;
201001
201002
201003
201004
201005
201006
201007
201008
201009
201010
201011
201012
;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5841i29BDA5B01567F07E/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Numeric.png" title="Numeric.png" /&gt;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2016 14:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-gt-Convert-Variable-Format-From-Datetime-to-Character/m-p/311416#M67296</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2016-11-14T14:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to -&gt; Convert  Variable Format From Datetime to Character Without Changing View of Variab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-gt-Convert-Variable-Format-From-Datetime-to-Character/m-p/311447#M67309</link>
      <description>&lt;P&gt;Hi turcay,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The put function should do this for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Have;
Length Numeric 8;
Infile Datalines Missover;
Input Numeric ;
Format Numeric DATETIME27.6;
Datalines;
201001
201002
201003
201004
201005
201006
201007
201008
201009
201010
201011
201012
;
Run;

data want;
set have;
char = put(numeric,DATETIME27.6);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Nov 2016 16:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-gt-Convert-Variable-Format-From-Datetime-to-Character/m-p/311447#M67309</guid>
      <dc:creator>BenbowL</dc:creator>
      <dc:date>2016-11-14T16:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to -&gt; Convert  Variable Format From Datetime to Character Without Changing View of Variab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-gt-Convert-Variable-Format-From-Datetime-to-Character/m-p/312139#M67650</link>
      <description>&lt;P&gt;What value does this actually represent?&amp;nbsp; 201001&lt;/P&gt;
&lt;P&gt;From your displayed values, my first guess is that this is a 4-digit year and then a 2-digit month. What would you expect the displayed value to be?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 22:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-gt-Convert-Variable-Format-From-Datetime-to-Character/m-p/312139#M67650</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-16T22:18:19Z</dc:date>
    </item>
  </channel>
</rss>

