Java Parse Time parseTimeStr(String timeStr)

Here you can find the source of parseTimeStr(String timeStr)

Description

parse Time Str

License

Apache License

Declaration

public static Date parseTimeStr(String timeStr) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static Date parseTimeStr(String timeStr) {
        try {/*from   ww  w . j av a2 s . c  om*/
            return new SimpleDateFormat("yyyy MM dd HH:mm:ss").parse(timeStr);
        } catch (java.text.ParseException e) {
            throw new Error("wrong time format '" + timeStr + "'");
        }
    }
}

Related

  1. parseTime(String timestring)
  2. parseTime(String timeString, TimeZone timeZone)
  3. parseTime(String token)
  4. parseTimeConfiguration(String time)
  5. parseTimeSpec(String[] spec)
  6. parseTimeString(String time)
  7. parseTimeString(String timeString)
  8. parseTimezoneOffset(String value)