We do not need to migrate data from ORACLE to MYSQL. Below I have written three simple MYSQL functions. For your reference. Is it time? [SQL] DELIMITER $ USE 'ytt' $ DROP FUNCTION IF exists' is _ date' $ CREATE DEFINER = 'root' @ 'localhost' FUNCTION 'is _ date '( f_in CHAR (19 )) returns tinyint (4) BEGIN -- Created by david. yang 2012/8/9. IF UNIX_TIMESTAMP (f_in) = 0 then return 0; else return 1; end if; END $ DELIMITER; www.2cto.com determines IF it is a number? [SQL] DELIMITER $ USE 'ytt' $ DROP FUNCTION IF exists' is _ number' $ CREATE DEFINER = 'root' @ 'localhost' FUNCTION 'is _ number '( f_in VARCHAR (255 )) returns tinyint (4) label1: BEGIN -- Created by david. yang 2012/8/9. DECLARE cnt int unsigned default 0; DECLARE I INT UNSIGNED DEFAULT 1; DECLARE j INT UNSIGNED DEFAULT 0; SET cnt = LENGTH (f_in); loop1: WHILE I <cnt do set j = ASCII (SUBSTR (f_in, I, 1); IF j <48 OR j> 57 then return 0; LEAVE label1; end if; SET I = I + 1; END WHILE loop1; RETURN 1; END $ www.2cto.com DELIMITER; MYSQL Implementation of ORACLE to_date function. [SQL] DELIMITER $ USE 'ytt' $ DROP FUNCTION IF exists' to _ date' $ CREATE DEFINER = 'root' @ 'localhost' FUNCTION 'to _ date '( f_date VARCHAR (30 ), f_format VARCHAR (30) returns varchar (30) CHARSET utf8 BEGIN -- '20-08-2011 22:55:02 ', 'dd-mm-yyyy hh24: mi: ss' -- '02-11-2011 ', 'dd-mm-yyyy' -- Created by david. yang 2012/8/9. DECLARE I _year CHAR (4); www.2cto.com DECLARE I _month CHAR (2); DECLARE I _day CHAR (2); DECLARE I _time CHAR (8); SET I _year = SUBSTR (f_date, 7, 4 ); SET I _month = SUBSTR (f_date, 4,2); SET I _day = LEFT (f_date, 2); if length (f_date) = 10 then set I _time = ''; else set I _time = RIGHT (f_date, 8); end if; return concat (I _year, '-', I _month, '-', I _day, '', I _time ); END $ DELIMITER;