Java tutorial
//package com.java2s; import android.text.format.Time; public class Main { public static long convertStrTimeToLong(String time_str) { /* input time string should have * - RFC 2445 DATETIM type: "%Y%m%dT%H%M%S" */ Time time = new Time(); time.parse(time_str); return time.normalize(false); } }