<?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: Adding one day to DATETIME date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497955#M132181</link>
    <description>&lt;P&gt;Do you mean you want to make the change if vs2 is more than an hour before vs1?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if vs1 - vs2 &amp;gt; 3600 then vs2 = intnx('dtday',vs2,1,'s');&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 21 Sep 2018 18:52:29 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-09-21T18:52:29Z</dc:date>
    <item>
      <title>Adding one day to DATETIME date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497943#M132173</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset where I need only to change the red vs2 date to a day later&amp;nbsp; (in below the first vs2 date really should be &lt;SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;24&lt;/FONT&gt;&lt;/STRONG&gt;APR2015:00:06:00&lt;/SPAN&gt;) and the last&amp;nbsp;&lt;SPAN&gt;vs2 date really should be&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;22&lt;/FONT&gt;&lt;/STRONG&gt;NOV2017:00:04:00, while the other dates should remain the same.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How should I handle situation like this?&amp;nbsp; Thanks as always&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;vs1&lt;/TD&gt;&lt;TD&gt;vs2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;23APR2015:23:51:00&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;23APR2015:00:06:00&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05MAY2015:13:00:00&lt;/TD&gt;&lt;TD&gt;05MAY2015:12:59:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06JUN2015:18:52:00&lt;/TD&gt;&lt;TD&gt;06JUN2015:18:52:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;23AUG2015:23:32:00&lt;/TD&gt;&lt;TD&gt;23AUG2015:23:30:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10SEP2015:20:39:00&lt;/TD&gt;&lt;TD&gt;10SEP2015:20:32:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;23SEP2015:21:48:00&lt;/TD&gt;&lt;TD&gt;23SEP2015:21:44:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07DEC2015:12:45:00&lt;/TD&gt;&lt;TD&gt;07DEC2015:12:27:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;21NOV2017:23:40:00&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;21NOV2017:00:04:00&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 21 Sep 2018 18:15:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497943#M132173</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2018-09-21T18:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one day to DATETIME date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497950#M132176</link>
      <description>&lt;P&gt;Is there logic for why those two need to change? Or do you just want to test for any value on those dates?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 18:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497950#M132176</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-09-21T18:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one day to DATETIME date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497951#M132177</link>
      <description>&lt;P&gt;How do you identify the dates that need to be changed?&lt;/P&gt;
&lt;P&gt;The function for calculation of intervals is intnx(). Use "dtday" as interval.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 18:40:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497951#M132177</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-21T18:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one day to DATETIME date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497952#M132178</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for inquiring, those values in red are the correct values, basically vs2 should start a few minutes after vs1, so the situation is vs1 and vs2 just happens to cross the midnight, while the other values have issues which I don't want to program to change, they need further investigation&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 18:44:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497952#M132178</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2018-09-21T18:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one day to DATETIME date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497954#M132180</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Thanks for inquiring. I plan to use&amp;nbsp;&lt;/P&gt;&lt;P&gt;vs1_2 = INTCK('hour',vs2,vs1);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;vs1_2&amp;nbsp; = 23;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to indentify those values across the midnight.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 18:48:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497954#M132180</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2018-09-21T18:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one day to DATETIME date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497955#M132181</link>
      <description>&lt;P&gt;Do you mean you want to make the change if vs2 is more than an hour before vs1?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if vs1 - vs2 &amp;gt; 3600 then vs2 = intnx('dtday',vs2,1,'s');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Sep 2018 18:52:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497955#M132181</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-21T18:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one day to DATETIME date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497956#M132182</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I should add 24 hours to vs2 to bring vs2 one day ahead of its current status, that is my plan, just like to consult the experts here&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 18:53:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-one-day-to-DATETIME-date/m-p/497956#M132182</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2018-09-21T18:53:25Z</dc:date>
    </item>
  </channel>
</rss>

