|
|
Archives of the TeradataForum
Message Posted: Thu, 16 May 2002 @ 17:32:17 GMT
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.
| |