Java Hour Format formatFromString(String date)

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

Description

format From String

License

Apache License

Declaration

public static Date formatFromString(String date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static Date formatFromString(String date) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {// w  w w .j a  v a 2 s. co m
            return sdf.parse(date);
        } catch (ParseException e) {
            //         e.printStackTrace();
        }
        return null;
    }
}

Related

  1. formatFilesystemOrder(Date date)
  2. formatForCookieExpiry(Date date)
  3. formatForFileName()
  4. formatForHttpHeader(long unixTime)
  5. formatFromDate(Date date)
  6. formatFullDate(Object date)
  7. formatFullTime(Date date)
  8. formatHDate(java.util.Date date)
  9. formatHoraFormatadaHHMMSSStr(Date hora)