Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 16 May 2002 @ 17:32:17 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Testing for valid dates
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, May 16, 2002 12:55 -->

I have a character (and sometimes numeric) field that has date values in the form ccyymmdd. Some of these are valid dates and some are not. Can someone suggest a way to insert the valid dates into a date column and set the non valid dates to null. I tried to substring the character date and check that the year is between x and y and the month is between 1 and 12 and the day is between 1 and 31. This almost works except for months that don't have 31 days etc... I used to use a function IS_DATE with a case statement in another RDBMS that made things very simple. Any suggestions?

Thanks.



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023