Here you can find the source of StrToDateSeco(String str)
public static Date StrToDateSeco(String str)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static SimpleDateFormat seconParse = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static Date StrToDateSeco(String str) { Date parse = null;/*from www . j av a 2 s. co m*/ try { parse = seconParse.parse(str); } catch (ParseException e) { e.printStackTrace(); } return parse; } }