Here you can find the source of convertDateTimeToSysTime(String sDateTime)
public static long convertDateTimeToSysTime(String sDateTime)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static long convertDateTimeToSysTime(String sDateTime) { int nYear = Integer.parseInt(sDateTime.substring(0, 4)); int nMonth = Integer.parseInt(sDateTime.substring(4, 6)); int nDay = Integer.parseInt(sDateTime.substring(6, 8)); int nHour = 0, nMinute = 0, nSecond = 0; if (sDateTime.length() == 14) { nHour = Integer.parseInt(sDateTime.substring(8, 10)); nMinute = Integer.parseInt(sDateTime.substring(10, 12)); nSecond = Integer.parseInt(sDateTime.substring(12, 14)); }/* w ww .j a va 2 s . c o m*/ Calendar calendar = Calendar.getInstance(); calendar.set(nYear, nMonth - 1, nDay, nHour, nMinute, nSecond); return calendar.getTime().getTime(); } }