title: DB:Raw not working for date format in postgres
body: <p>I have the well executed postgres query.I have tried to convert this in laravel</p>
  <p>but query not executed</p>
  <pre class="lang-sql prettyprint-override"><code>select
      id,
      month,
      meeting_start_date,
      call_start_date
  from mgl_report_targets  
  where extract(
      Month from to_date(mgl_report_targets.month, '%Month-%YYYY')
  ) 
  in (
      extract(MONTH from meeting_start_date), extract(MONTH from call_start_date)
  );
  </code></pre>
  <h3>try 1</h3>
  <pre class="lang-php prettyprint-override"><code>$db = DB::table('mgl_report_targets as t');
  $db = $db-&gt;where(function ($query) {
       return $query-&gt;whereIn(DB::Raw(&quot;extract(MONTH from meeting_start_date)&quot;), DB::Raw(&quot;extract(Month from to_date('t.month', %Month-%YYYY))&quot;))
       -&gt;orWhereIn(DB::Raw(&quot;extract(MONTH from call_start_date)&quot;), DB::Raw(&quot;extract(Month from to_date('t.month', %Month-%YYYY))&quot;));
  })
  -&gt;select('id','month','meeting_start_date','call_start_date')-&gt;get();
  </code></pre>
  <p>But no luck.getting Parse error: syntax error, unexpected '}', expecting ';'</p>
  <h3>Try 2</h3>
  <pre class="lang-php prettyprint-override"><code>$db = DB::table('mgl_report_targets as t')
  -&gt;where(DB::Raw(&quot;extract(Month from to_date(mgl_report_targets.month, '%Month-%YYYY')) in (extract(MONTH from meeting_start_date), extract(MONTH from call_start_date))&quot;))
  -&gt;select('id','month','meeting_start_date','call_start_date')
  -&gt;get();
  </code></pre>
  <p>Nothing return from my try 2</p>