<?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 DATATIME formate puzzle in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108708#M30298</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="260198" data-username="ballardw" href="https://communities.sas.com/people/ballardw" id="jive-26019837101327084268803"&gt;ballardw&lt;/A&gt; ,thanks for taking time to view my requests.sorry for having not explain well, in fact i want all value in this birthday variable to be replaced with year 2012 to calculate something.anyway bago help to sovle this .Thank you.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;dawn&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 May 2012 01:42:00 GMT</pubDate>
    <dc:creator>bbb_NG</dc:creator>
    <dc:date>2012-05-10T01:42:00Z</dc:date>
    <item>
      <title>SAS DATATIME formate puzzle</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108704#M30294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have a variable called birthday in datatime format like "12NOV1935:00:00:00",&lt;/P&gt;&lt;P&gt;How can I just pick out month and day and add year 2012 to form "12NOV2012:00:00:00" (in sas datetime format)&lt;/P&gt;&lt;P&gt;or ""12NOV2012" (in sas date format)?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 09:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108704#M30294</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2012-05-09T09:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DATATIME formate puzzle</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108705#M30295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use function datepart to extract the date. You can use functions month &amp;amp; day to extract month &amp;amp; day information. You can use function mdy to construct the date "format" and you can use dhms to reconstruct the datetime format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* example code */&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;x = "12NOV1935:00:00:00"dt;&lt;/P&gt;&lt;P&gt;datepart = datepart(x);&lt;/P&gt;&lt;P&gt;put x;&lt;/P&gt;&lt;P&gt;put datepart date9.;&lt;/P&gt;&lt;P&gt;mon = month(datepart);&lt;/P&gt;&lt;P&gt;day = day(datepart);&lt;/P&gt;&lt;P&gt;put mon=;&lt;/P&gt;&lt;P&gt;put day=;&lt;/P&gt;&lt;P&gt;mdyt = dhms(mdy(mon,day,2012),0,0,0);&lt;/P&gt;&lt;P&gt;put mdyt datetime18.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;More information about aformentioned functions can be found at Functions and CALL Routines (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245852.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245852.htm&lt;/A&gt;&lt;SPAN&gt; ).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bago&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 11:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108705#M30295</guid>
      <dc:creator>Bago</dc:creator>
      <dc:date>2012-05-09T11:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DATATIME formate puzzle</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108706#M30296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Was the 1935 year value expected to be 2012 and you are getting it erroneously? If so it is probably a good idea to look at how the data is getting into SAS and the source as prevention is way better than fixing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 15:06:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108706#M30296</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-05-09T15:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DATATIME formate puzzle</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108707#M30297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bago,thanks for your example code.I need this function dhms.And it solved my problem.Very thanks.&lt;/P&gt;&lt;P&gt;and sorry that I can not find a correct answer click in this page.&lt;/P&gt;&lt;P&gt;Dawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2012 01:39:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108707#M30297</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2012-05-10T01:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DATATIME formate puzzle</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108708#M30298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="260198" data-username="ballardw" href="https://communities.sas.com/people/ballardw" id="jive-26019837101327084268803"&gt;ballardw&lt;/A&gt; ,thanks for taking time to view my requests.sorry for having not explain well, in fact i want all value in this birthday variable to be replaced with year 2012 to calculate something.anyway bago help to sovle this .Thank you.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;dawn&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2012 01:42:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-DATATIME-formate-puzzle/m-p/108708#M30298</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2012-05-10T01:42:00Z</dc:date>
    </item>
  </channel>
</rss>

