Java tutorial
//package com.java2s; //License from project: LGPL import java.util.Calendar; public class Main { public static long timeToMills(String timeString) { Calendar c = Calendar.getInstance(); c.set(Integer.parseInt(timeString.substring(0, 4)), Integer.parseInt(timeString.substring(4, 6)) - 1, Integer.parseInt(timeString.substring(6, 8)), Integer.parseInt(timeString.substring(8, 10)), Integer.parseInt(timeString.substring(10, 12)), Integer.parseInt(timeString.substring(12, 14))); return c.getTimeInMillis(); } }