Java String to Date stringToDateTemporalCoverage(String dateString)

Here you can find the source of stringToDateTemporalCoverage(String dateString)

Description

string To Date Temporal Coverage

License

Apache License

Declaration

public static Date stringToDateTemporalCoverage(String dateString) throws ParseException 

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 stringToDateTemporalCoverage(String dateString) throws ParseException {

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

        try {//from  www  .  ja  v  a 2  s.com
            return sdf.parse(dateString);
        } catch (NullPointerException ex) {
            return null;
        } catch (ParseException ex) {
            return null;
        }

    }
}

Related

  1. StringToDateByformat1(String time)
  2. stringToDateForIng(String date_str)
  3. StringToDateFormat(String str, String format)
  4. stringToDateInTimeZone(String time, String timeZone)
  5. stringToDateMetaData(String dateString)
  6. stringToDatetime(String str, String format)
  7. stringToDatetime(String string)
  8. stringToDateTime(String stringDate, String format)
  9. stringToDateWithFormat(String stringToConvert, String dateFormat)