Here you can find the source of convertToDateTimeNoSec(String date)
public static Date convertToDateTimeNoSec(String date) throws Exception
//package com.java2s; //License from project: Open Source License import java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; public class Main { public static Date convertToDateTimeNoSec(String date) throws Exception { DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm"); return df.parse(date); }/*from ww w. j a va 2 s.c o m*/ }