Here you can find the source of getMaxTimeByStringDate(String date)
public static java.util.Date getMaxTimeByStringDate(String date)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; public class Main { public static java.util.Date getMaxTimeByStringDate(String date) { try {/*from ww w . j a v a 2s. c om*/ String maxTime = date + " 23:59:59"; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return sdf.parse(maxTime); } catch (Exception e) { return null; } } }