mysql> select CAST(concat(myyear,'-',mymonth,'-',myday) as DATE) from mytable; +----------------------------------------------------+ | CAST(concat(myyear,'-',mymonth,'-',myday) as DATE) | +----------------------------------------------------+ | 2000-05-14 | | NULL | | NULL | | NULL | +----------------------------------------------------+ 4 rows in set, 3 warnings (0.00 sec) mysql> show warnings; +---------+------+--------------------------------------------------+ | Level | Code | Message | +---------+------+--------------------------------------------------+ | Warning | 1292 | Truncated incorrect datetime value: '2004-12-34' | | Warning | 1292 | Truncated incorrect datetime value: '1997-15-12' | | Warning | 1292 | Truncated incorrect datetime value: '2005-25-1' | +---------+------+--------------------------------------------------+ 3 rows in set (0.00 sec)