<?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: Calculating the future dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/908002#M358385</link>
    <description>&lt;P&gt;Dosing is the dose Date of Cycle 1(variable name is C1D1). if the dosing(C1D1) is not missing then I need to calculate the dates when the lab will be collected. the calculation is as below&lt;/P&gt;
&lt;P&gt;C1D1 = date of C1D1&lt;/P&gt;
&lt;P&gt;C1D3 = C1D1+3 days,&lt;/P&gt;
&lt;P&gt;C1D5 = C1D1+5days,&lt;/P&gt;
&lt;P&gt;C1D8= C1D1+8 days,&lt;/P&gt;
&lt;P&gt;C1D15 = C1D1+15 days,&lt;/P&gt;
&lt;P&gt;C1D22 = C1D1+22 days,&lt;/P&gt;
&lt;P&gt;C1D29 = C1D1+29 days,&lt;/P&gt;
&lt;P&gt;C1D36 = C1D1+36 days,&lt;/P&gt;
&lt;P&gt;Anticipated Lab dates mentioned above have to be calculated for cycle 1 to cycle 4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From cycle 5 to cycle 20 the lab dates are calculated only for C5D1, C6D1 , C7D1, etc....which will be the same date as dose date C5D1, C6D1 , C7D1, etc ...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is no end of treatment&amp;nbsp; (EOT) then calculate the lab dates up to cycle 20. if the EOT date is present then cycle stop when cycle has reached the EOT date.&amp;nbsp; The Dosing dates exists for all subject until cycle 20 where the EOT is Not missing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2023 14:02:09 GMT</pubDate>
    <dc:creator>k26_23</dc:creator>
    <dc:date>2023-12-14T14:02:09Z</dc:date>
    <item>
      <title>Calculating the future dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/907950#M358365</link>
      <description>&lt;P&gt;&amp;nbsp;I have cycle 1 to 20, for first 3 cycle the lab is done on C1D1 C1D3 C1D8 C1D15 C1D22 C1D29 C1D36, after which Lab is performed only on&amp;nbsp; Day 1 (CxD1). now I need to calculate the future dates for the lab, when the dosing is present. how do I calculate the future dates for the lab based on the number of days from the Dosing date, only if the lab missing for all 20 cycles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The dosing indicates the cycle 1 dosing,&amp;nbsp; cycle 2 dosing , so on....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This is the excel output(proc report) which has to be filled with the calculated dates&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 864pt;" border="0" width="1152" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD colspan="2" width="128" height="20" class="xl69" style="border-right: .5pt solid black; height: 15.0pt; width: 96pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD colspan="8" width="512" class="xl69 lia-align-center" style="border-right: .5pt solid black; border-left: none; width: 384pt;"&gt;Cycle 1&lt;/TD&gt;
&lt;TD colspan="8" width="512" class="xl69 lia-align-center" style="border-right: .5pt solid black; border-left: none; width: 384pt;"&gt;Cycle 2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD colspan="2" height="20" class="xl69" style="border-right: .5pt solid black; height: 15.0pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD colspan="8" class="xl69 lia-align-center" style="border-right: .5pt solid black; border-left: none;"&gt;LAB&lt;/TD&gt;
&lt;TD colspan="8" class="xl69 lia-align-center" style="border-right: .5pt solid black; border-left: none;"&gt;Lab&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;Subject&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;EOT&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none;"&gt;Dosing&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none;"&gt;C1D1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C1D3&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C1D8&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C1D15&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C1D22&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C1D29&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C1D36&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none;"&gt;Dosing&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none;"&gt;C2D1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C2D3&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C2D8&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C2D15&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C2D22&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C2D29&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;C2D36&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt;"&gt;1032&lt;/TD&gt;
&lt;TD class="xl78" style="border-left: none;"&gt;31Jan2023&lt;/TD&gt;
&lt;TD class="xl74"&gt;29Nov2022&lt;/TD&gt;
&lt;TD class="xl73"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl75" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl68"&gt;.&lt;/TD&gt;
&lt;TD class="xl76"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl75" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt; border-top: none;"&gt;2005&lt;/TD&gt;
&lt;TD class="xl78" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl74" style="border-top: none;"&gt;10Jan2023&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl79" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none;"&gt;21Feb2023&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt; border-top: none;"&gt;2008&lt;/TD&gt;
&lt;TD class="xl78" style="border-top: none; border-left: none;"&gt;16Mar2023&lt;/TD&gt;
&lt;TD class="xl74" style="border-top: none;"&gt;19Jan2023&lt;/TD&gt;
&lt;TD class="xl75" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none;"&gt;.&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt; border-top: none;"&gt;2009&lt;/TD&gt;
&lt;TD class="xl78" style="border-top: none; border-left: none;"&gt;26Apr2023&lt;/TD&gt;
&lt;TD class="xl74" style="border-top: none;"&gt;01Feb2023&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none;"&gt;.&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt; border-top: none;"&gt;2011&lt;/TD&gt;
&lt;TD class="xl78" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl74" style="border-top: none;"&gt;20Jan2023&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none;"&gt;08Mar2023&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl80" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl79" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt; border-top: none;"&gt;2013&lt;/TD&gt;
&lt;TD class="xl78" style="border-top: none; border-left: none;"&gt;17Aug2023&lt;/TD&gt;
&lt;TD class="xl74" style="border-top: none;"&gt;01Feb2023&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none;"&gt;15Mar2023&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt; border-top: none;"&gt;2014&lt;/TD&gt;
&lt;TD class="xl78" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl74" style="border-top: none;"&gt;03Feb2023&lt;/TD&gt;
&lt;TD class="xl79" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl75" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none;"&gt;16Mar2023&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt; border-top: none;"&gt;2015&lt;/TD&gt;
&lt;TD class="xl78" style="border-top: none; border-left: none;"&gt;20Mar2023&lt;/TD&gt;
&lt;TD class="xl74" style="border-top: none;"&gt;06Feb2023&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl75" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt; border-top: none;"&gt;2016&lt;/TD&gt;
&lt;TD class="xl78" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl74" style="border-top: none;"&gt;03Feb2023&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none;"&gt;18Mar2023&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl72" style="height: 15.0pt; border-top: none;"&gt;2017&lt;/TD&gt;
&lt;TD class="xl78" style="border-top: none; border-left: none;"&gt;08May2023&lt;/TD&gt;
&lt;TD class="xl74" style="border-top: none;"&gt;13Feb2023&lt;/TD&gt;
&lt;TD class="xl79" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl75" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl75" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl76" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none;"&gt;27Mar2023&lt;/TD&gt;
&lt;TD class="xl80" style="border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl80" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl80" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl77" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 23:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/907950#M358365</guid>
      <dc:creator>k26_23</dc:creator>
      <dc:date>2023-12-13T23:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the future dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/907957#M358368</link>
      <description>&lt;P&gt;I can't follow your description because you don't have any variables named D1 D3 D8 D15 D22 D29 D36.&lt;/P&gt;
&lt;P&gt;The "cycle" heading done that way is not valid in a SAS data set. What you show would not be a valid data set also because you imply having multiple variables named "dosing".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should have a&amp;nbsp; variable on each observation that indicates the Cycle and not try to stick such information into additional multiple variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have an actual date valued SAS variable in a data set the function INTNX will allow you to create a value based on a date and increment it forward or backward. The first parameter is the interval to use, common are Day, Week, Month, Quarter, Year and a few others, the second is the base date value, the third is the number of intervals to add/subtract and last is an indicator S, same relative day of month or year for example, B , beginning of interval, or E, end of interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The interval is text&lt;/P&gt;
&lt;P&gt;Newvar = intnx('day',dosing,1); would assign a value of 1 day greater than Dosing to the Newvar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have multiple variables that you want to deal with than array may be the way to do such but it isn't clear what actual intervals might be involved. Another temporary array with the incrementing value might be the way to approach that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide an example of the data set that you currently have as data step code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 23:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/907957#M358368</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-12-13T23:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the future dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/907958#M358369</link>
      <description>&lt;P&gt;Edited my questions.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 23:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/907958#M358369</guid>
      <dc:creator>k26_23</dc:creator>
      <dc:date>2023-12-13T23:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the future dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/907993#M358383</link>
      <description>&lt;P&gt;Please explain, step-by-step, leaving nothing out, how we compute the value that goes in column C1D1 for subject 1032. What about column C1D3 for subject 1032? What about column C2D1 for subject 1032?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the data for subject 2005 is missing EOT, please explain the above questions for subject 2005.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 11:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/907993#M358383</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-12-14T11:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the future dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/908002#M358385</link>
      <description>&lt;P&gt;Dosing is the dose Date of Cycle 1(variable name is C1D1). if the dosing(C1D1) is not missing then I need to calculate the dates when the lab will be collected. the calculation is as below&lt;/P&gt;
&lt;P&gt;C1D1 = date of C1D1&lt;/P&gt;
&lt;P&gt;C1D3 = C1D1+3 days,&lt;/P&gt;
&lt;P&gt;C1D5 = C1D1+5days,&lt;/P&gt;
&lt;P&gt;C1D8= C1D1+8 days,&lt;/P&gt;
&lt;P&gt;C1D15 = C1D1+15 days,&lt;/P&gt;
&lt;P&gt;C1D22 = C1D1+22 days,&lt;/P&gt;
&lt;P&gt;C1D29 = C1D1+29 days,&lt;/P&gt;
&lt;P&gt;C1D36 = C1D1+36 days,&lt;/P&gt;
&lt;P&gt;Anticipated Lab dates mentioned above have to be calculated for cycle 1 to cycle 4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From cycle 5 to cycle 20 the lab dates are calculated only for C5D1, C6D1 , C7D1, etc....which will be the same date as dose date C5D1, C6D1 , C7D1, etc ...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is no end of treatment&amp;nbsp; (EOT) then calculate the lab dates up to cycle 20. if the EOT date is present then cycle stop when cycle has reached the EOT date.&amp;nbsp; The Dosing dates exists for all subject until cycle 20 where the EOT is Not missing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 14:02:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/908002#M358385</guid>
      <dc:creator>k26_23</dc:creator>
      <dc:date>2023-12-14T14:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the future dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/908017#M358387</link>
      <description>&lt;P&gt;To do this in SAS, we would need to see something like a SAS data set and not an Excel file. In a SAS data set, there cannot be two variables named DOSING.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS, the words you wrote are the code you want, except with a semi-colon at the end instead of a comma.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;C1D1 = date of C1D1&lt;/P&gt;
&lt;P&gt;C1D3 = C1D1+3 days,&lt;/P&gt;
&lt;P&gt;C1D5 = C1D1+5days,&lt;/P&gt;
&lt;P&gt;C1D8= C1D1+8 days,&lt;/P&gt;
&lt;P&gt;C1D15 = C1D1+15 days,&lt;/P&gt;
&lt;P&gt;C1D22 = C1D1+22 days,&lt;/P&gt;
&lt;P&gt;C1D29 = C1D1+29 days,&lt;/P&gt;
&lt;P&gt;C1D36 = C1D1+36 days,&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Except, you cannot define C1D1 as date of C1D1, this is circular logic and doesn't explain anything. I really still don't know what date C1D1 is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, to do this in SAS well, you don't want a table arranged as in Excel. You want a LONG data set, not a WIDE data set. Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;subject&amp;nbsp; &amp;nbsp;&amp;nbsp; cycle_number        eot               dosing            num_days     date
1032         1                  31JAN2023      29NOV2022               1
1032         1                  31JAN2023      29NOV2022               3&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 15:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/908017#M358387</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-12-14T15:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the future dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/908024#M358390</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I have cycle 1 to 20, for first 3 cycle the lab is done on C1D1 C1D3 C1D8 C1D15 C1D22 C1D29 C1D36, after which Lab is performed only on&amp;nbsp; Day 1 (CxD1). now I need to calculate the future dates for the lab, when the dosing is present. how do I calculate the future dates for the lab based on the number of days from the Dosing date, only if the lab missing for all 20 cycles.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;So if you have data like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input subject cycle start :date. end :date.;
  format start end date9.;
cards;
1032 1 29NOV2022 31JAN2023
1032 2 19JAN2023 16MAR2023
2005 4 01FEB2021 15APR2021
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can generate a record for each expect lab sample date like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  length labday $8 labdate 8;
  format labdate date9.;
  if cycle in (1:3) then do day=1,3,8 by 7 while((start+day-1)&amp;lt;=end);
    labday=cats('C',cycle,'D',day);
    labdate=start+day-1;
    output;
  end;
  else do;
    day=1;
    labday=cats('C',cycle,'D',day);
    labdate=start;
    output;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Results:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;Obs    subject    cycle        start          end    labday      labdate    day

  1      1032       1      29NOV2022    31JAN2023    C1D1      29NOV2022      1
  2      1032       1      29NOV2022    31JAN2023    C1D3      01DEC2022      3
  3      1032       1      29NOV2022    31JAN2023    C1D8      06DEC2022      8
  4      1032       1      29NOV2022    31JAN2023    C1D15     13DEC2022     15
  5      1032       1      29NOV2022    31JAN2023    C1D22     20DEC2022     22
  6      1032       1      29NOV2022    31JAN2023    C1D29     27DEC2022     29
  7      1032       1      29NOV2022    31JAN2023    C1D36     03JAN2023     36
  8      1032       1      29NOV2022    31JAN2023    C1D43     10JAN2023     43
  9      1032       1      29NOV2022    31JAN2023    C1D50     17JAN2023     50
 10      1032       1      29NOV2022    31JAN2023    C1D57     24JAN2023     57
 11      1032       1      29NOV2022    31JAN2023    C1D64     31JAN2023     64
 12      1032       2      19JAN2023    16MAR2023    C2D1      19JAN2023      1
 13      1032       2      19JAN2023    16MAR2023    C2D3      21JAN2023      3
 14      1032       2      19JAN2023    16MAR2023    C2D8      26JAN2023      8
 15      1032       2      19JAN2023    16MAR2023    C2D15     02FEB2023     15
 16      1032       2      19JAN2023    16MAR2023    C2D22     09FEB2023     22
 17      1032       2      19JAN2023    16MAR2023    C2D29     16FEB2023     29
 18      1032       2      19JAN2023    16MAR2023    C2D36     23FEB2023     36
 19      1032       2      19JAN2023    16MAR2023    C2D43     02MAR2023     43
 20      1032       2      19JAN2023    16MAR2023    C2D50     09MAR2023     50
 21      1032       2      19JAN2023    16MAR2023    C2D57     16MAR2023     57
 22      2005       4      01FEB2021    15APR2021    C4D1      01FEB2021      1

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 15:30:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-future-dates/m-p/908024#M358390</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-12-14T15:30:09Z</dc:date>
    </item>
  </channel>
</rss>

