Java String to Date StringToDateByformat1(String time)

Here you can find the source of StringToDateByformat1(String time)

Description

String To Date Byformat

License

Open Source License

Declaration

public static Date StringToDateByformat1(String time) throws ParseException 

Method Source Code


//package com.java2s;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static Date StringToDateByformat1(String time) throws ParseException {
        return format1.parse(time);
    }/*from  www .  j  a v  a  2s .c  o  m*/
}

Related

  1. StringToDate1(String strDate)
  2. stringToDate10(String date)
  3. stringToDateAndTime(final String dateAndTimeString)
  4. stringToDateByconf(String str, String formate)
  5. StringToDateByFormat(String dateStr, String formatStr)
  6. stringToDateForIng(String date_str)
  7. StringToDateFormat(String str, String format)
  8. stringToDateInTimeZone(String time, String timeZone)
  9. stringToDateMetaData(String dateString)