<?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: To_char function not located error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/To-char-function-not-located-error/m-p/189176#M47808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might have better luck posting the question in a forum that specializes in Oracle SQL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Feb 2014 19:49:31 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2014-02-27T19:49:31Z</dc:date>
    <item>
      <title>To_char function not located error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-char-function-not-located-error/m-p/189175#M47807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Afternoon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to know how I can get this to work for me. Everything but this portion is not working and need to know why the error appears and how to get it to work. Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TO_DATE(((TO_DATE('01-JAN-1970','DD-MON-RRRR')) + ((h.MODIFIED/86400) + (-7/24)))) as time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table ACCESS_SUMMARY as &lt;/P&gt;&lt;P&gt;&amp;nbsp; select a.type_,s.clinic , a.code, a.appointment, a.createdate,a.date_ , s.custom1 as LOC, a.clinic, a.patient, c.chart, r.typecode,&lt;/P&gt;&lt;P&gt;&amp;nbsp; A.producer, datepart(A.Date_), month(datepart(A.DATE_)) as month, h.modified as modifiedtime,&lt;/P&gt;&lt;P&gt;&amp;nbsp; TO_DATE(((TO_DATE('01-JAN-1970','DD-MON-RRRR')) + ((h.MODIFIED/86400) + (-7/24)))) as time,&lt;/P&gt;&lt;P&gt;&amp;nbsp; (datepart(A.DATE_) - datepart(A.createdate)) / 7 as n_weeks,&lt;/P&gt;&lt;P&gt;&amp;nbsp; case when (month(datepart(A.DATE_)) in (1,2,3)) then 'Q1'&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (month(datepart(A.DATE_)) in (4,5,6)) then 'Q2'&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (month(datepart(A.DATE_)) in (7,8,9)) then 'Q3'&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (month(datepart(A.DATE_)) in (10,11,12)) then 'Q4'&lt;/P&gt;&lt;P&gt;&amp;nbsp; else ''&lt;/P&gt;&lt;P&gt;&amp;nbsp; end as Quarter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; from myora.ax_appoint A,&lt;/P&gt;&lt;P&gt;&amp;nbsp; myora.ax_patient c,&lt;/P&gt;&lt;P&gt;&amp;nbsp; myora.ax_producer r,&lt;/P&gt;&lt;P&gt;&amp;nbsp; myora.ax_clinic S,&lt;/P&gt;&lt;P&gt;&amp;nbsp; myora.ax_appthis h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where&amp;nbsp;&amp;nbsp; c.patient = a.patient&lt;/P&gt;&lt;P&gt;&amp;nbsp; and A.APPOINTMENT = H.APPOINTMENT&lt;/P&gt;&lt;P&gt;&amp;nbsp; and r.producer = a.producer&lt;/P&gt;&lt;P&gt;&amp;nbsp; and a.clinic = s.clinic&lt;/P&gt;&lt;P&gt;&amp;nbsp; and a.status = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; and a.type_ in (2,1,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp; and h.type_ = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; and r.typecode in &amp;amp;DENT&lt;/P&gt;&lt;P&gt;&amp;nbsp; and A.date_ between &amp;amp;TDDAY and &amp;amp;ENDDATE &lt;/P&gt;&lt;P&gt;&amp;nbsp; and a.date_ = a.createdate and &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; coalesce(a.code, 'unknown') not in ('NEWAPT', 'EVAL','NEWA','NEWA INT','EVAL1','NEWPT','2CH 3U ASST')&lt;/P&gt;&lt;P&gt;&amp;nbsp; and a.code not in&amp;nbsp; ('NEWAPT', 'EVAL','NEWA','NEWA INT','EVAL1','NEWPT','2CH 3U ASST')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; order by s.custom1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 19:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-char-function-not-located-error/m-p/189175#M47807</guid>
      <dc:creator>pbravo</dc:creator>
      <dc:date>2014-02-27T19:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: To_char function not located error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-char-function-not-located-error/m-p/189176#M47808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might have better luck posting the question in a forum that specializes in Oracle SQL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 19:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-char-function-not-located-error/m-p/189176#M47808</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-02-27T19:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: To_char function not located error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-char-function-not-located-error/m-p/189177#M47809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunetly, I am working in SAS and need this to work in SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I need a variable stored in seconds converted to a the date it represents, any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 19:53:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-char-function-not-located-error/m-p/189177#M47809</guid>
      <dc:creator>pbravo</dc:creator>
      <dc:date>2014-02-27T19:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: To_char function not located error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-char-function-not-located-error/m-p/189178#M47810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It doesn't work because those are SQL functions, not SAS functions.&lt;/P&gt;&lt;P&gt;Find the relevant SAS functions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A SAS datetime is defined as the number of seconds from January 1, 1960.&amp;nbsp; So exactly how your variable is stored is important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some functions to consider:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;intnx&lt;/P&gt;&lt;P&gt;intck&lt;/P&gt;&lt;P&gt;input&lt;/P&gt;&lt;P&gt;put&lt;/P&gt;&lt;P&gt;datepart&lt;/P&gt;&lt;P&gt;month/year/day&lt;/P&gt;&lt;P&gt;timepart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 20:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-char-function-not-located-error/m-p/189178#M47810</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-27T20:05:39Z</dc:date>
    </item>
  </channel>
</rss>

