Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.text.SimpleDateFormat;
- import java.util.Date;
- import java.text.ParseException;
- import java.util.Locale;
- public class HelloWorld{
- public static void main(String []args){
- SimpleDateFormat df = new SimpleDateFormat("EE MMM dd HH:mm:ss z yyyy");
- String strData = null;
- try {
- Date dt = df.parse("Sun Aug 31 19:47:33 BRT 2014");
- // Date dt = df.parse("Jun 01 12:53:10 IST 2013");
- strData = df.format(dt);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement