Java String to Date StrToDateSeco(String str)

Here you can find the source of StrToDateSeco(String str)

Description

Str To Date Seco

License

Open Source License

Declaration

public static Date StrToDateSeco(String str) 

Method Source Code


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

Related

  1. strToDate(String strDate)
  2. strToDate(String strDate, String format)
  3. strToDate(String time, String format)
  4. strToDate3(String i_StrDate)
  5. strToDateM6(String StrToDate)
  6. strToDatetime(String sStr)
  7. strToDateWithFormat(String strDate, Format format)
  8. TimeStringToDate(String s)
  9. timeToDate(String time)