<?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: Calculate the numbers of day logic in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774295#M246080</link>
    <description>&lt;P&gt;The INTCK function will return number of intervals between date, time or datetime values, you specify the interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But example data and what you expect the result to look like will get you much further than use constantly guessing what you may have and what you want the result to look like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A data step is particularly helpful because we have people ask questions about "date" values and then after many "but that doesn't work" comments find out the actual values are not dates but character values or datetime values. SAS uses different values for storing dates and time or datetime values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Oct 2021 16:58:49 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-10-14T16:58:49Z</dc:date>
    <item>
      <title>Calculate the numbers of day logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774285#M246070</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to calculate the following logic using the two date fields (DOS and IESD).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DOS&lt;/STRONG&gt; on the &lt;STRONG&gt;IESD&lt;/STRONG&gt; or in the 28 days following the IESD.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 16:41:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774285#M246070</guid>
      <dc:creator>Jesusismygrace</dc:creator>
      <dc:date>2021-10-14T16:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the numbers of day logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774292#M246077</link>
      <description>42</description>
      <pubDate>Thu, 14 Oct 2021 16:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774292#M246077</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-14T16:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the numbers of day logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774293#M246078</link>
      <description>&lt;P&gt;You will need to provide more context as this really doesn't tell me anything&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Assuming they are both SAS Date values, then you can just subtract one from the other to get number of days&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you provide some sample data and code, and the expected output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_blank"&gt;Data2DataStep Maco instructions&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 16:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774293#M246078</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-10-14T16:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the numbers of day logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774294#M246079</link>
      <description>&lt;P&gt;Do you mean&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if IESD le DOS le IESD + 28&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 16:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774294#M246079</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-14T16:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the numbers of day logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774295#M246080</link>
      <description>&lt;P&gt;The INTCK function will return number of intervals between date, time or datetime values, you specify the interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But example data and what you expect the result to look like will get you much further than use constantly guessing what you may have and what you want the result to look like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A data step is particularly helpful because we have people ask questions about "date" values and then after many "but that doesn't work" comments find out the actual values are not dates but character values or datetime values. SAS uses different values for storing dates and time or datetime values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 16:58:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774295#M246080</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-14T16:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the numbers of day logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774894#M246312</link>
      <description>Thank you</description>
      <pubDate>Mon, 18 Oct 2021 14:24:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-the-numbers-of-day-logic/m-p/774894#M246312</guid>
      <dc:creator>Jesusismygrace</dc:creator>
      <dc:date>2021-10-18T14:24:31Z</dc:date>
    </item>
  </channel>
</rss>

