Here you can find the source of parseDate(String dateString)
Parameter | Description |
---|---|
dateString | Cadena |
public static Date parseDate(String dateString)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.*; public class Main { public static String FORMATDATE = "yyyy/MM/dd"; /**/* w w w. j a v a2 s . c o m*/ * Genera un objeto Date a partir de una cadena con una fecha * * @param dateString Cadena * @return Objeto Date */ public static Date parseDate(String dateString) { SimpleDateFormat dateFormat = new SimpleDateFormat(FORMATDATE); Date date; try { date = dateFormat.parse(dateString); } catch (Exception e) { date = null; } return date; } }