title: Getting Error with Date Format in To_Char
body: <p>I am getting error in the second script. Please explain why i am getting error in the second script.</p>
  
  <blockquote>
    <blockquote>
      <p>select count(*) from LCL_SHR_IncidentIntegrationInt where 
      externalsystem = 'IPSOFT' 
      and (to_char(sysdate,'<strong>YYYYMMDDHH24MISS</strong>')-to_char(fn_adjusted_date(CREATE_DATE),'<strong>YYYYMMDDHH24MISS</strong>')) > 180;</p>
      
      <p><strong>O/P : 122797</strong></p>
      
      <p>select count(*) from LCL_SHR_IncidentIntegrationInt where 
      externalsystem = 'IPSOFT' 
      and (to_char(sysdate,'<strong>DD-MM-YYYY HH24:MI:SS</strong>')-to_char(fn_adjusted_date(CREATE_DATE),'<strong>DD-MM-YYYY HH24:MI:SS</strong>')) > 180;</p>
      
      <p><strong>O/P :</strong> ORA-01722: invalid number
      01722. 00000 -  "invalid number"
      *Cause:    The specified number was invalid.
      *Action:   Specify a valid number.</p>
    </blockquote>
  </blockquote>