Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static final String dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"; // 2011-01-29T00:02:08+06:00
- public static Calendar parseDate(String strDate) throws ParseException {
- SimpleDateFormat sdf = new SimpleDateFormat(dateFormat, Locale.US);
- Calendar cal = Calendar.getInstance();
- cal.setTime(sdf.parse(strDate));
- return cal;
- }
Add Comment
Please, Sign In to add comment