SimpleDateFormat dtp = new SimpleDateFormat("dd-MM-yy"
Date dt = dtp.parse("01-02-03", new ParsePosition(0));
System.out.println(dt);
SimpleDateFormat dtp1 = new SimpleDateFormat("dd-MMM-yy"
Date dt1 = dtp1.parse("01-jan-03", new ParsePosition(0));
System.out.println(dt1);
System.out.println(new Date());
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.