<?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: Using datetime variable in proc report in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20629#M4290</link>
    <description>tod. works.  &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot!!!</description>
    <pubDate>Fri, 23 May 2008 14:12:01 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-05-23T14:12:01Z</dc:date>
    <item>
      <title>Using datetime variable in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20624#M4285</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I want to show a datetime variable as two seperate columns for date and time using proc report.  This can be done quite simply by adding another datastep before I do the proc report but this is too inefficient for large datasets.&lt;BR /&gt;
&lt;BR /&gt;
Here is the code I have:&lt;BR /&gt;
proc report data=shona.oos nowindows   ;&lt;BR /&gt;
column jtmdtid date time2  ;&lt;BR /&gt;
&lt;BR /&gt;
define date/computed format=date9. "Date";&lt;BR /&gt;
define time2/computed format=time8. "Time";&lt;BR /&gt;
define jtmdtid/display "";&lt;BR /&gt;
&lt;BR /&gt;
compute date;&lt;BR /&gt;
date=datepart(jtmdtid);&lt;BR /&gt;
endcomp;&lt;BR /&gt;
compute time2;&lt;BR /&gt;
time2=timepart(jtmdtid);&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
But the problem is the compute blocks won't work unless I have variable jtmdtid in the column part.  If I do that then the datetime variable is displayed in the report.  I either a completely different way of converting datetime to date and time or else a way of hiding a variable that is specified as a column.&lt;BR /&gt;
&lt;BR /&gt;
Any help is much appreciated.</description>
      <pubDate>Fri, 23 May 2008 09:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20624#M4285</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-23T09:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using datetime variable in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20625#M4286</link>
      <description>In PROC REPORT&lt;BR /&gt;
Define the column for display twice.&lt;BR /&gt;
First with format DTdate.&lt;BR /&gt;
Second, with format DTtime.&lt;BR /&gt;
&lt;BR /&gt;
Good Luck&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Fri, 23 May 2008 11:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20625#M4286</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-23T11:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using datetime variable in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20626#M4287</link>
      <description>To things can be done.&lt;BR /&gt;
&lt;BR /&gt;
1)  use "nodisplay" -- that is, read more of the documentation for Proc Report.&lt;BR /&gt;
&lt;BR /&gt;
2)  use dtdate. and dttime. formats -- that is, read more of the documentation for SAS's formats.&lt;BR /&gt;
&lt;BR /&gt;
SAS documentation is available at &lt;A href="http://support.sas.com/documentation/" target="_blank"&gt;http://support.sas.com/documentation/&lt;/A&gt;</description>
      <pubDate>Fri, 23 May 2008 12:23:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20626#M4287</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-23T12:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using datetime variable in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20627#M4288</link>
      <description>Thanks for your help Peter and Chuck.  &lt;BR /&gt;
&lt;BR /&gt;
The dtdate format worked ok but for dttime it has the following error.&lt;BR /&gt;
&lt;BR /&gt;
ERROR: The format DTTIME was not found or could not be loaded&lt;BR /&gt;
&lt;BR /&gt;
I can't find anything in the documentation either when I do a search for dttime which is very odd.</description>
      <pubDate>Fri, 23 May 2008 13:30:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20627#M4288</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-23T13:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using datetime variable in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20628#M4289</link>
      <description>sorry that I assumed without checking, that DTtime format would exist.&lt;BR /&gt;
  &lt;BR /&gt;
TOD. provides hh:mm:ss from a datetime value, so hopefully that will do better.&lt;BR /&gt;
  &lt;BR /&gt;
PeterC</description>
      <pubDate>Fri, 23 May 2008 13:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20628#M4289</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-23T13:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using datetime variable in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20629#M4290</link>
      <description>tod. works.  &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot!!!</description>
      <pubDate>Fri, 23 May 2008 14:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20629#M4290</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-23T14:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using datetime variable in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20630#M4291</link>
      <description>Ditto</description>
      <pubDate>Mon, 26 May 2008 14:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-datetime-variable-in-proc-report/m-p/20630#M4291</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-26T14:46:32Z</dc:date>
    </item>
  </channel>
</rss>

