<?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 calculation at 3 months interval or trimester dates in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830798#M41324</link>
    <description>&lt;P&gt;If this is more than an exercise, I suggest that you refine your definition of "pregnancy start date" and "end of first/second/third trimester". A good place to start is the &lt;A href="https://en.wikipedia.org/wiki/Pregnancy#Trimesters" target="_self"&gt;Wikipedia page on human Pregnancy&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Sun, 28 Aug 2022 19:44:21 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2022-08-28T19:44:21Z</dc:date>
    <item>
      <title>Date calculation at 3 months interval or trimester dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830794#M41321</link>
      <description>&lt;P&gt;Hi fellow SAS users,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I seek your help. I have a date variable which is pregnancy start date as preg_start. &amp;nbsp;I would like to create 3 date vars: End of trimester 1, end of trimester 2 and end of trimester 3&lt;/P&gt;
&lt;P&gt;I.e. I would like to calculate date at &amp;nbsp;the end &amp;nbsp;of each trimester.&lt;/P&gt;
&lt;P&gt;Suppose my date is 1st jan 2005, I would like to have the output as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Preg_start&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end_trimester_1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end_trimester_2 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end_trimester3&lt;/P&gt;
&lt;P&gt;1JAN2005&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 31Mar2005 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30JUN2005&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30SEP2005&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 18:55:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830794#M41321</guid>
      <dc:creator>Sharan</dc:creator>
      <dc:date>2022-08-28T18:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date calculation at 3 months interval or trimester dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830795#M41322</link>
      <description>&lt;P&gt;How do you define end of trimester dates? In terms of days after Preg_Start?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 19:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830795#M41322</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-08-28T19:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date calculation at 3 months interval or trimester dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830797#M41323</link>
      <description>&lt;P&gt;A pregnancy trimester is defined as 13 weeks or 91 days, so you simply add the number 91 three times (SAS dates are counts of days).&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 19:29:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830797#M41323</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-28T19:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date calculation at 3 months interval or trimester dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830798#M41324</link>
      <description>&lt;P&gt;If this is more than an exercise, I suggest that you refine your definition of "pregnancy start date" and "end of first/second/third trimester". A good place to start is the &lt;A href="https://en.wikipedia.org/wiki/Pregnancy#Trimesters" target="_self"&gt;Wikipedia page on human Pregnancy&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 19:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830798#M41324</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2022-08-28T19:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date calculation at 3 months interval or trimester dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830875#M41327</link>
      <description>&lt;PRE&gt;data _null_;
x='01jan2005'd;
d1=intnx('qtr',x,1,'s')-1;
d2=intnx('qtr',x,2,'s')-1;
d3=intnx('qtr',x,3,'s')-1;

put (x d:) (= date9.);
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Aug 2022 12:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-calculation-at-3-months-interval-or-trimester-dates/m-p/830875#M41327</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-08-29T12:05:48Z</dc:date>
    </item>
  </channel>
</rss>

