SimpleDateFormat
può convertire le stringhe in java.util.Date oggetti.Date la classe ha un getTime() metodo che restituisce la data in formato ora unix (numero di millisecondi dal 1 gennaio 1970, 00:00:00 GMT).
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss");
long unix_time = dateFormat.parse(date).getTime();
Puoi usare UNIX_TIMESTAMP() in MySQL per convertire anche in unix time.
mysql> SELECT UNIX_TIMESTAMP('2007-11-30 10:30:19');
-> 1196440219