Java Date Parse convertStrToDate(String day)

Here you can find the source of convertStrToDate(String day)

Description

convert Str To Date

License

Open Source License

Declaration

public static Date convertStrToDate(String day) throws ParseException 

Method Source Code


//package com.java2s;
import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static SimpleDateFormat dayParse = new SimpleDateFormat("yyyy-MM-dd");

    public static Date convertStrToDate(String day) throws ParseException {
        // day = "2015-09-06 23:23:12";
        Date parse = dayParse.parse(day);
        return parse;

    }// w ww. j  a v a2  s  .com
}

Related

  1. convertStringToDateTimeNotException(String date)
  2. convertStringToDateWithRFC1123(final String dateTime)
  3. convertStringToTime(String date, String pattern)
  4. convertStringToTime(String date, String pattern)
  5. convertStrToDate(String dateStr, String dateFormat)
  6. convertStrToDate(String s, String format)
  7. convertStrToDate(String source)
  8. convertTFormatToCDATime(String tDate)
  9. convertTimeInMillisecondsToDate(long timeInMilliseconds)