Java String to Date toDate(String s)

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

Description

to Date

License

Open Source License

Declaration

public static Date toDate(String s) throws Exception 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.DateFormat;

import java.text.SimpleDateFormat;
import java.util.*;

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

    public static Date toDate(String s) throws Exception {
        return sdf1.parse(s);
    }/*  w w w . ja v  a 2  s . co  m*/
}

Related

  1. toDate(String param)
  2. toDate(String patten, String value)
  3. toDate(String pattern, String date)
  4. toDate(String pString, String pFormat)
  5. toDate(String s)
  6. toDate(String s, String format)
  7. toDate(String sdate, SimpleDateFormat dateFormater)
  8. toDate(String sDate, String sFmt)
  9. toDate(String str)