base/common/src/main/com/thesett/common/validate/Validation.java
public static Date toDate(String s)
    {
        // Build a date formatter using the format specified by dateFormat
        DateFormat dateFormatter = new SimpleDateFormat(dateFormat);

        try
        {
            return dateFormatter.parse(s);
        }
        catch (ParseException e)
        {
            // Exception noted so can be ignored.
            e = null;

            return null;
        }
    }
public static Date toDate(String s)
    {
        // Build a date formatter using the format specified by dateFormat
        DateFormat dateFormatter = new SimpleDateFormat(dateFormat);

        try
        {
            return dateFormatter.parse(s);
        }
        catch (ParseException e)
        {
            // Exception noted so can be ignored.
            e = null;

            return null;
        }
    }
public static Date toDate ( String s ) { // Build a date formatter using the format specified by dateFormat DateFormat dateFormatter = new SimpleDateFormat ( dateFormat ) ; try { return dateFormatter . parse ( s ) ; } catch ( ParseException e ) { // Exception noted so can be ignored. e = null ; return null ; } }
Converts a string to a date. The string must be a date in the correct format or this method will return null.

@param  s The string to convert.

@return The string as a date or null if it is not a valid date.
Converts a string to a date . The string must be a date in the correct format or this method will return null .