<?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 proc sql max(datetime) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-max-datetime/m-p/49523#M13454</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
when I want to use max() function over datetime column in proc sql mode, I get some integer result 1.6067E9&lt;BR /&gt;
&lt;BR /&gt;
Is it able to cast this number to datetime? Or how can i use max() function on datetime column?&lt;BR /&gt;
&lt;BR /&gt;
Thank you in advance</description>
    <pubDate>Tue, 14 Dec 2010 11:20:48 GMT</pubDate>
    <dc:creator>Julo</dc:creator>
    <dc:date>2010-12-14T11:20:48Z</dc:date>
    <item>
      <title>proc sql max(datetime)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-max-datetime/m-p/49523#M13454</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
when I want to use max() function over datetime column in proc sql mode, I get some integer result 1.6067E9&lt;BR /&gt;
&lt;BR /&gt;
Is it able to cast this number to datetime? Or how can i use max() function on datetime column?&lt;BR /&gt;
&lt;BR /&gt;
Thank you in advance</description>
      <pubDate>Tue, 14 Dec 2010 11:20:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-max-datetime/m-p/49523#M13454</guid>
      <dc:creator>Julo</dc:creator>
      <dc:date>2010-12-14T11:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql max(datetime)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-max-datetime/m-p/49524#M13455</link>
      <description>Variables containing date-, time- and datetime-values are always integers. They look like "dates" when a format is applied to them. So adding a format to the variable containing the maximum will solve the problem.&lt;BR /&gt;
[pre]proc sql print;&lt;BR /&gt;
	select max(modate) format=datetime.&lt;BR /&gt;
		from sashelp.vtable;&lt;BR /&gt;
quit;[/pre]</description>
      <pubDate>Tue, 14 Dec 2010 11:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-max-datetime/m-p/49524#M13455</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2010-12-14T11:27:57Z</dc:date>
    </item>
  </channel>
</rss>

