Java Date from String convertToDateTimeNoSec(String date)

Here you can find the source of convertToDateTimeNoSec(String date)

Description

convert To Date Time No Sec

License

Open Source License

Declaration

public static Date convertToDateTimeNoSec(String date) throws Exception 

Method Source Code


//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*/
}

Related

  1. convertToDate(String str, String format)
  2. convertToDate(String strDate, String format)
  3. convertToDate(String strDate, String format)
  4. convertToDate(String val)
  5. convertToDate(String value)
  6. convertToDateTimeString(Date d1)
  7. convertToDateWithTimeString(Date date)
  8. getDateFromPattern(String pattern)
  9. getDateFromReccurenceInterval(int reqDOW, int reqDOM, int time)