<?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: Difference between days in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753444#M237465</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133090"&gt;@RandyStan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Holidays are just a pleasure for such problems especially because the differ between states. Many organizations have somewhere a working day table (or a table with holidays). If so then you could use such a table to generate a custom interval and then use this custom interval with the intck() function to get what you want.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jul 2021 09:09:45 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2021-07-12T09:09:45Z</dc:date>
    <item>
      <title>Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753348#M237418</link>
      <description>&lt;P&gt;Dear All:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Date&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01JUL2021&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;02JUL2021&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;06JUL2021&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;09JUL2021&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;02MAR2021&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;09MAR2021&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12MAR2021&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;14MAY2021&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want Work Days Between Trades and my data should be as follows.&amp;nbsp; The first observation of each ID should be -50000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Work_Days_Between_Visits&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01JUL2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -50000&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;02JUL2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;06JUL2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; /* 5 July was a Holiday*/&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;09JUL2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;02MAR2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -50000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;09MAR2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12MAR2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;14MAY2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-50000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please Help.&amp;nbsp; And Thanks in Advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 15:47:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753348#M237418</guid>
      <dc:creator>RandyStan</dc:creator>
      <dc:date>2021-07-10T15:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753354#M237419</link>
      <description>&lt;P&gt;Why is 2 July for ID 1 zero?&lt;/P&gt;
&lt;P&gt;And if the idea is "days between trades" why the heck is 6 July not 4 (from 2 July). How do you get 4 for the value between 9 Mar and 2 Mar?&lt;/P&gt;
&lt;P&gt;Your rules are pretty incomplete. Stating a value for one case does not explain the general rule that would be needed for coding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is you "date" an actual SAS date value or a character value? There are functions that will return information like is a specific date a known holiday or a week day but they won't work without a SAS date valued variable.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And can you explain why -50000 is a desirable value. For almost any work in SAS it would be preferable to use a missing value instead of some obscure number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The LAG function can get the value for a variable on a previous record. If the data is sorted by ID and date then you can identify the first record for an ID with the SAS automatic variable First.Id if you process data with a BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can provide data in the form of a working data step then you may get some example code for bits of this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 17:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753354#M237419</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-10T17:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753360#M237420</link>
      <description>&lt;P&gt;Hello, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133090"&gt;@RandyStan&lt;/a&gt;, I have a particular problem with this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;My data is as follows:

ID        Date
1         01JUL2021
1         02JUL2021
1         06JUL2021
1         09JUL2021
2         02MAR2021
2         09MAR2021
2         12MAR2021
3         14MAY2021&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;We usually ask for data in the form of a SAS data step, such as the output of &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;. Why? Because we need to know if the variables are numeric or character, this is critical for dates, and we cannot be sure whatever code we provide will work without knowing this. Please, in this case and in the future, provide data according to the instructions.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 17:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753360#M237420</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-10T17:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753379#M237426</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I want the first value to be a NULL value.&amp;nbsp; So I randomly chose -50000.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The date format is DATE9. SAS date format.&lt;/P&gt;&lt;P&gt;The file is attached..&amp;nbsp; In this file I left the first cell of each ID blank to indicate a NULL value.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Thank you so much&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 14:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753379#M237426</guid>
      <dc:creator>RandyStan</dc:creator>
      <dc:date>2021-07-11T14:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753380#M237427</link>
      <description>&lt;P&gt;Excel files don't help us understand if your SAS data set contains numeric dates or character dates. And many of us will not download attachments. So, again, I ask you to follow the instructions given (and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; has also asked) and provide the data as a SAS data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The choice of -50000 (or any non-missing value) is a particularly poor choice, and it should be set to missing.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 14:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753380#M237427</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-11T14:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753382#M237428</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this is what was wanted.&lt;/P&gt;&lt;P&gt;Thanks much&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data WDBV;&lt;/P&gt;&lt;P&gt;input ID&amp;nbsp; date DATE9. ;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cards ;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01JUL2021&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 02JUL2021&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 06JUL2021&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 09JUL2021&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 02MAR2021&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 09MAR2021&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12MAR2021&lt;/P&gt;&lt;P&gt;3&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; 14MAY2021&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Work_Days_Between_Visits&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01JUL2021&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 02JUL2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 06JUL2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 09JUL2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 02MAR2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 09MAR2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/P&gt;&lt;P&gt;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; 12MAR2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;3&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; 14MAY2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 15:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753382#M237428</guid>
      <dc:creator>RandyStan</dc:creator>
      <dc:date>2021-07-11T15:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753385#M237430</link>
      <description>&lt;P&gt;Stealing shamelessly from &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt; 's article on &lt;A href="https://blogs.sas.com/content/sasdummy/2011/05/09/calculating-the-number-of-working-days-between-two-dates/" target="_self"&gt;computing work-days&lt;/A&gt;, here is some code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WDBV;
input ID date :DATE9. ; 
cards ;
1              01JUL2021
1              02JUL2021
1              06JUL2021
1              09JUL2021
2              02MAR2021
2              09MAR2021
2              12MAR2021
3              14MAY2021
;

proc fcmp  outlib=work.myfuncs.dates;
  function networkdays(d1,d2,holidayDataset $,dateColumn $);
 
    /* make sure the start date &amp;lt; end date */
    start_date = min(d1,d2);
    end_date = max(d1,d2);
 
    /* read holiday data into array */
    /* array will resize as necessary */
    array holidays[1] / nosymbols; 
    if (not missing(holidayDataset) and exist(holidayDataset)) then
        rc = read_array(holidayDataset, holidays, dateColumn);
    else put "NOTE: networkdays(): No Holiday data considered"; 
 
    /* INTCK computes transitions from one day to the next */
    /* To include the start date, if it is a weekday, then */
    /*  make the start date one day earlier.               */
    if (1 &amp;lt; weekday(start_date)&amp;lt; 7) then 
       calc_start_date = start_date-1; 
    else 
       calc_start_date = start_date;
    diff = intck('WEEKDAY', calc_start_date, end_date);
    do i = 1 to dim(holidays);
      if (1 &amp;lt; weekday(holidays[i])&amp;lt; 7) and
         (start_date &amp;lt;= holidays[i] &amp;lt;= end_date) then
            diff = diff - 1; 
    end; 
    return(diff);
  endsub; 
run; 
quit;

options cmplib=work.myfuncs;
data want;
    set wdbv;
    by id;
    prev_date=lag(date);
    if not first.id then do;
	   diff1 = intck('WEEKDAY', prev_date, date)-1; /* DIFF1 counts weekdays */
	   /* DIFF2 counts working days */
       diff2 = networkdays(prev_date, date, "work.usholidays","holidaydate")-2;
    end;
    format prev_date date date9.;
run;
	   &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It's not clear to me why your output has 0 work days between 02JUL2021 and 06JUL2021, as it seems to me that there is one work day.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 18:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753385#M237430</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-11T18:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753435#M237459</link>
      <description>&lt;P&gt;To get the starting -50000, test&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;first.ID&lt;/FONT&gt;&amp;nbsp; (so you must use a BY statement).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To count the days, do a loop &lt;FONT face="courier new,courier"&gt;from lag(DATE) to DATE&lt;/FONT&gt;, and test if each day is either a weekend&amp;nbsp; (function WEEKDAY) or a holiday (function HOLIDAY if you are in the US, which you seem to be).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 07:56:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753435#M237459</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-07-12T07:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753444#M237465</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133090"&gt;@RandyStan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Holidays are just a pleasure for such problems especially because the differ between states. Many organizations have somewhere a working day table (or a table with holidays). If so then you could use such a table to generate a custom interval and then use this custom interval with the intck() function to get what you want.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 09:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753444#M237465</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-07-12T09:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753516#M237504</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133090"&gt;@RandyStan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;I want the first value to be a NULL value.&amp;nbsp; So I randomly chose -50000.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The date format is DATE9. SAS date format.&lt;/P&gt;
&lt;P&gt;The file is attached..&amp;nbsp; In this file I left the first cell of each ID blank to indicate a NULL value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Thank you so much&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SAS has a missing value that is basically a "NULL". For numeric values the default displays as a dot in tables.&lt;/P&gt;
&lt;P&gt;You can assign a missing value to a variable a couple of ways in a data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Variable = . ;&lt;/P&gt;
&lt;P&gt;Call missing(variable);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;are the easiest. Call missing will take a list of variables and works with character and numeric variables.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 15:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-days/m-p/753516#M237504</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-12T15:01:35Z</dc:date>
    </item>
  </channel>
</rss>

