Here you can find the source of isDatetimeParsable(String value)
public static synchronized boolean isDatetimeParsable(String value)
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Locale; public class Main { private static final SimpleDateFormat DATETIME_FORMATTER = new SimpleDateFormat("dd.MM.yyyy HH:mm", Locale.GERMAN);/*from ww w. j a v a 2 s . co m*/ public static synchronized boolean isDatetimeParsable(String value) { try { return DATETIME_FORMATTER.parse(value) != null; } catch (ParseException e) { return false; } } }