title: ORA-01843 not a valid month- Comparing Dates
body: <p>I have a problem when try to select data from a table filtering by date. </p>
  
  <p>For example:</p>
  
  <blockquote>
  <pre><code>SELECT * FROM MYTABLE WHERE MYTABLE.DATEIN = '23/04/49';
  </code></pre>
  </blockquote>
  
  <p>The Oracle Error is: </p>
  
  <blockquote>
  <pre><code>Informe de error:
  Error SQL: ORA-01843: mes no válido
  01843. 00000 -  "not a valid month"
  *Cause:    
  *Action:
  </code></pre>
  </blockquote>
  
  <p>Probably the source data of table is corrupted, in this case:</p>
  
  <ul>
  <li>How can i solve this problem?</li>
  <li>Can I change this dates for null? </li>
  </ul>
  
  <p>The results of this select, <code>select * from nls_session_parameters;</code> , is:</p>
  
  <pre><code>PARAMETER                      VALUE                                  
  ------------------------------ ----------------------------------------
  NLS_LANGUAGE                   SPANISH                                  
  NLS_TERRITORY                  SPAIN                                    
  NLS_CURRENCY                   ¿                                        
  NLS_ISO_CURRENCY               SPAIN                                    
  NLS_NUMERIC_CHARACTERS         ,.                                       
  NLS_CALENDAR                   GREGORIAN                                
  NLS_DATE_FORMAT                DD/MM/RR                                 
  NLS_DATE_LANGUAGE              SPANISH                                  
  NLS_SORT                       SPANISH                                  
  NLS_TIME_FORMAT                HH24:MI:SSXFF                            
  NLS_TIMESTAMP_FORMAT           DD/MM/RR HH24:MI:SSXFF                   
  NLS_TIME_TZ_FORMAT             HH24:MI:SSXFF TZR                        
  NLS_TIMESTAMP_TZ_FORMAT        DD/MM/RR HH24:MI:SSXFF TZR               
  NLS_DUAL_CURRENCY              ¿                                        
  NLS_COMP                       BINARY                                   
  NLS_LENGTH_SEMANTICS           BYTE                                     
  NLS_NCHAR_CONV_EXCP            FALSE 
  </code></pre>