<?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: Format 20101222 15:59:57.94 in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Format-20101222-15-59-57-94/m-p/58863#M16546</link>
    <description>This will subtract 24 hours from your date field.  Change the -24 to whatever you want in order to add/subtract any number of hours from a date time.&lt;BR /&gt;
&lt;BR /&gt;
intnx('hour', **insert your date field here**, -24);</description>
    <pubDate>Wed, 05 Jan 2011 15:15:17 GMT</pubDate>
    <dc:creator>mdavidson</dc:creator>
    <dc:date>2011-01-05T15:15:17Z</dc:date>
    <item>
      <title>Format 20101222 15:59:57.94</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-20101222-15-59-57-94/m-p/58862#M16545</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I got a data field which looks like 20101222 15:59:57.94&lt;BR /&gt;
&lt;BR /&gt;
I need to find the dates which are in the last 24 and 48 hours. Can anybody tell me which format to use?&lt;BR /&gt;
&lt;BR /&gt;
Kind Regards&lt;BR /&gt;
&lt;BR /&gt;
Filip</description>
      <pubDate>Wed, 05 Jan 2011 13:30:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-20101222-15-59-57-94/m-p/58862#M16545</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2011-01-05T13:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Format 20101222 15:59:57.94</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-20101222-15-59-57-94/m-p/58863#M16546</link>
      <description>This will subtract 24 hours from your date field.  Change the -24 to whatever you want in order to add/subtract any number of hours from a date time.&lt;BR /&gt;
&lt;BR /&gt;
intnx('hour', **insert your date field here**, -24);</description>
      <pubDate>Wed, 05 Jan 2011 15:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-20101222-15-59-57-94/m-p/58863#M16546</guid>
      <dc:creator>mdavidson</dc:creator>
      <dc:date>2011-01-05T15:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Format 20101222 15:59:57.94</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-20101222-15-59-57-94/m-p/58864#M16547</link>
      <description>INTNX is the correct function, however argument #1 needs to be "DTHOUR" for a SAS DATETIME variable.  If your input data-string is a SAS CHARACTER variable, then you need to convert it to a SAS numeric type DATETIME variable, likely in a DATA step.  One way is to split up the string into the DATE and TIME portions, then use the SAS INPUT function in assignment statements to convert each component, and then use a DHMS function to create your SAS DATETIME numeric variable.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
sas datetime variables site:sas.com</description>
      <pubDate>Wed, 05 Jan 2011 15:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-20101222-15-59-57-94/m-p/58864#M16547</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-01-05T15:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Format 20101222 15:59:57.94</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format-20101222-15-59-57-94/m-p/58865#M16548</link>
      <description>Ok thanks, i was on the good way as i had already splitted the datetime into a datepart and timepart. Thanks for the help.</description>
      <pubDate>Thu, 06 Jan 2011 07:42:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format-20101222-15-59-57-94/m-p/58865#M16548</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2011-01-06T07:42:45Z</dc:date>
    </item>
  </channel>
</rss>

