Created
December 17, 2011 15:33
-
-
Save mingder78/1490504 to your computer and use it in GitHub Desktop.
SimpleDateFormat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String v_date_str="Sun Mar 06 11:28:16 IST 2011"; DateFormat formatter; formatter = new SimpleDateFormat("EEE MMM d HH:mm:ss zzz yyyy"); Date date_temp=null; String d_temp=null; SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy"); try { date_temp = (Date) formatter.parse(v_date_str); d_temp = dateFormat.format(date_temp); System.out.println("val : "+d_temp); } catch (ParseException ex) {// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment