Java Parse Date parseDate(String date)

Here you can find the source of parseDate(String date)

Description

parse Date

License

Open Source License

Declaration

static public DateTime parseDate(String date) throws ParseException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.ParseException;
import java.text.SimpleDateFormat;
import org.joda.time.DateTime;

public class Main {
    private static final SimpleDateFormat inputDateFormat = new SimpleDateFormat("yyyyMMdd-hhmmss");

    static public DateTime parseDate(String date) throws ParseException {

        try {/*from  w  w  w. j  a v  a 2  s.c o  m*/
            return new DateTime(inputDateFormat.parse(date));
        } catch (ParseException e) {
            throw e;
        }
    }
}

Related

  1. parseDate(String date)
  2. parseDate(String date)
  3. parseDate(String date)
  4. parseDate(String date)
  5. parseDate(String date)
  6. parseDate(String date)
  7. parseDate(String date)
  8. parseDate(String date)
  9. parseDate(String date)