Java String to Date toDate(String date)

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

Description

to Date

License

Apache License

Declaration

public static Date toDate(String date) 

Method Source Code


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

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

public class Main {
    private final static SimpleDateFormat _data = new SimpleDateFormat("dd/MM/yyyy");

    public static Date toDate(String date) {
        Date d = null;//from   w  w  w . ja v  a  2 s .c  om
        try {
            d = _data.parse(date);
        } catch (Exception e) {

        }
        return d;
    }
}

Related

  1. toDate(Object v, String format, Date defaultValue)
  2. toDate(Object value, String format)
  3. toDate(String createdAt)
  4. toDate(String d)
  5. toDate(String date)
  6. toDate(String date)
  7. toDate(String date)
  8. toDate(String date)
  9. toDate(String date)