Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. import java.text.SimpleDateFormat;
  2. import java.util.Date;
  3. import java.text.ParseException;
  4. import java.util.Locale;
  5.  
  6. public class HelloWorld{
  7.  
  8. public static void main(String []args){
  9. SimpleDateFormat df = new SimpleDateFormat("EE MMM dd HH:mm:ss z yyyy");
  10. String strData = null;
  11. try {
  12. Date dt = df.parse("Sun Aug 31 19:47:33 BRT 2014");
  13. // Date dt = df.parse("Jun 01 12:53:10 IST 2013");
  14. strData = df.format(dt);
  15. } catch (ParseException e) {
  16. e.printStackTrace();
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement