Here you can find the source of TimeStringToDate(String s)
public static Date TimeStringToDate(String s)
//package com.java2s; //License from project: Open Source License import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date TimeStringToDate(String s) { Date date = new Date(); try {//w w w .jav a 2 s.c om SimpleDateFormat simpledateformat = new SimpleDateFormat("HH:mm:ss"); ParsePosition parseposition = new ParsePosition(0); date = simpledateformat.parse(s, parseposition); } catch (Exception ex) { } return date; } }