Guest User

Untitled

a guest
Jul 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. private static final String dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"; // 2011-01-29T00:02:08+06:00
  2.  
  3. public static Calendar parseDate(String strDate) throws ParseException {
  4. SimpleDateFormat sdf = new SimpleDateFormat(dateFormat, Locale.US);
  5. Calendar cal = Calendar.getInstance();
  6. cal.setTime(sdf.parse(strDate));
  7. return cal;
  8. }
Add Comment
Please, Sign In to add comment