<?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: Date format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362671#M85697</link>
    <description>&lt;P&gt;Yes, but you already have those two variables? &amp;nbsp;If you have:&lt;BR /&gt;TRTSTDT &amp;nbsp; TRTETDT&lt;/P&gt;
&lt;P&gt;01JAN2017 10JAN2017&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After your code you would have:&lt;/P&gt;
&lt;P&gt;TRTSTDT &amp;nbsp; TRTETDT &amp;nbsp; &amp;nbsp;STUDY_START &amp;nbsp; STUDY_END&lt;/P&gt;
&lt;P&gt;01JAN2017 10JAN2017 &amp;nbsp;01JAN2017 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10JAN2017&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It just doesn't make sense to me, you would have to explain that extra code in your reviewers guide as well?&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2017 11:15:31 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-05-30T11:15:31Z</dc:date>
    <item>
      <title>Date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362665#M85693</link>
      <description>&lt;P&gt;Here is the below code which i am using and the studystart and end is coming as&amp;nbsp;01JAN1960 for all.&lt;/P&gt;&lt;P&gt;The input dataset TRTSDT and TRTEDT has both date9. format and numeric. I am not sure why it is converting to&amp;nbsp;&lt;SPAN&gt;01JAN1960 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro ndtv(StudyStart=TRTSDT,&lt;BR /&gt;StudyEnd=TRTEDT&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data inc;&lt;BR /&gt;format STUDY_START STUDY_END date9.;&lt;BR /&gt;set adam.adsl;&lt;BR /&gt;STUDY_START = datepart(&amp;amp;StudyStart.);&lt;BR /&gt;STUDY_END = datepart(&amp;amp;StudyEnd.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%mend;&lt;BR /&gt;%ndtv;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 10:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362665#M85693</guid>
      <dc:creator>alexdsa310</dc:creator>
      <dc:date>2017-05-30T10:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362668#M85694</link>
      <description>&lt;P&gt;The DATEPART function should only be applied to SAS DATETIME values, not to SAS DATE values. &amp;nbsp;Evidently, your&amp;nbsp;incoming variables (TRTSDT and TRTEDT) are already SAS dates. &amp;nbsp;You can simply replace those two lines of your DATA step with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STUDY_START = &amp;amp;StudyStart.;&lt;/P&gt;
&lt;P&gt;STUDY_END = &amp;amp;StudyEnd.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 10:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362668#M85694</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-05-30T10:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362669#M85695</link>
      <description>&lt;P&gt;Hi, bit off topic, what is the purpose of this code? &amp;nbsp;You have ADaM datasets (which are the basis for analysis) with the date variables already present, why the intermediary step to duplicate variables?&lt;/P&gt;
&lt;P&gt;TRTSDT indicates a date variable - i.e. doesn't contain timepart, which is why I question the code, as it doesn't actually do anything?&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 10:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362669#M85695</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-30T10:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362670#M85696</link>
      <description>&lt;P&gt;I am using this for table creation and specifying start date and end date from adsl in macro call for AE tables&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 10:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362670#M85696</guid>
      <dc:creator>alexdsa310</dc:creator>
      <dc:date>2017-05-30T10:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362671#M85697</link>
      <description>&lt;P&gt;Yes, but you already have those two variables? &amp;nbsp;If you have:&lt;BR /&gt;TRTSTDT &amp;nbsp; TRTETDT&lt;/P&gt;
&lt;P&gt;01JAN2017 10JAN2017&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After your code you would have:&lt;/P&gt;
&lt;P&gt;TRTSTDT &amp;nbsp; TRTETDT &amp;nbsp; &amp;nbsp;STUDY_START &amp;nbsp; STUDY_END&lt;/P&gt;
&lt;P&gt;01JAN2017 10JAN2017 &amp;nbsp;01JAN2017 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10JAN2017&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It just doesn't make sense to me, you would have to explain that extra code in your reviewers guide as well?&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 11:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-format/m-p/362671#M85697</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-30T11:15:31Z</dc:date>
    </item>
  </channel>
</rss>

