Here you can find the source of toDate(String dateToDatify)
Parameter | Description |
---|---|
dateToDatify | a parameter |
public static Date toDate(String dateToDatify)
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); /**/*from w w w .ja v a 2 s. c o m*/ * Creer une date GMT * * @param dateToDatify * @return */ public static Date toDate(String dateToDatify) { try { return sdf.parse(dateToDatify); } catch (ParseException e) { return null; } } }