title: TO_DATE and then use in the WHERE with a BETWEEN
body: <p>Can I take this SELECT below, substr out the 24 hour fallacy and replace it with 00 hour and then run the WHERE TRUNC(TO_DATE(FIX_DATETIME, 'MMDDYYHH24MISS')) BETWEEN TRUNC(SYSDATE-90) AND TRUNC(SYSDATE)?  Can it be done in one pass? If so,whether on pass or more, how?  You help is very much appreciated and your skill levels are respected.</p>
  
  <pre><code>SELECT MOPACTIVITY.MOPID,
      (CASE 
          WHEN SUBSTR(MOPACTIVITY.MOPID, 7, 2) = '24' THEN SUBSTR(MOPACTIVITY.MOPID, 1, 2)||SUBSTR(MOPACTIVITY.MOPID, 3, 2)||SUBSTR(MOPACTIVITY.MOPID, 5, 2)||'00'||SUBSTR(MOPACTIVITY.MOPID, 9, 2)||SUBSTR(MOPACTIVITY.MOPID, 11, 2)
          ELSE MOPACTIVITY.MOPID
      END ) FIX_DATETIME,
  sysdate "SYSDATE"
  FROM MOPUSER.MOPACTIVITY
  </code></pre>