title: ERROR: function date_trunc(timestamp without time zone) does not exist
body: <p>I have this problem. I have an sql query am trying to make to my postgres db. These queries work fine in oracle but am in the process of converting it to a postgres query but it complains. This is the query:</p>
  <pre><code>select  to_char(calldate,'Day') as Day, date_trunc(calldate) as transdate,
  Onnet' as destination,ceil(sum(callduration::integer/60) )as    total_minutes,round(sum(alltaxcost::integer) ,2)as revenue
  from cdr_data 
  where callclass ='008' and callsubclass='001'
  and callduration::integer &gt;0
  and  regexp_like(identifiant,'^73')
  and bundleunits = 'Money'
  and inserviceresultindicator in (0,5)
  and regexp_like(regexp_replace(callednumber,'^256','') ,'^73')
  group by  to_char(calldate,'Day') ,trunc(calldate),'Onnet' order by 2
  </code></pre>
  <p>And the error am getting is this:</p>
  <pre><code>Err] ERROR:  function date_trunc(timestamp without time zone) does not exist
  LINE 4: select  to_char(calldate,'Day') as Day, date_trunc(calldate)...
  </code></pre>
  <p>What am I doing wrong, or what is the solution to this error?</p>