Here you can find the source of parseDate(String date)
SimpleDateFormat
Parameter | Description |
---|---|
date | a parameter |
Parameter | Description |
---|---|
ParseException | an exception |
public static Date parseDate(String date) throws ParseException
//package com.java2s; //License from project: Open Source License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**//from w w w . j ava 2s .c o m * Parst Datum aus String mit <code>SimpleDateFormat</code> * * @param date * @return * @throws ParseException */ public static Date parseDate(String date) throws ParseException { SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss"); Date output = format.parse(date); return output; } }