All Forums Database
sinara 7 posts Joined 10/15
21 Oct 2015
How to check an invalid date in Teradata

I am a newbie in Teradata. I need to check a date column has valid date in case statement. This column is in "YYYY-MM-DD" format. If this field is invalid need to use '1900-01-01' as default. Can anyone please guide me on this?

LUCAS 56 posts Joined 06/09
21 Oct 2015

Hi Sinara,
an invalid date occurs when attempting to insert an erroneous date value (character chain or number) in a DATE DATATYPE column. You should consider the DATATYPE and the FORMAT.
have a look at the docs (

CarlosAL 512 posts Joined 04/08
21 Oct 2015

This is usually done with an OUTER JOIN to SYS_CALENDAR.CALENDAR.

You must sign in to leave a comment.