FileDocCategorySizeDatePackage
DateParse1.javaAPI DocExample483Fri Apr 20 21:16:32 BST 2001None

DateParse1

public class DateParse1 extends Object
Show some date uses

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


		SimpleDateFormat formatter
			= new SimpleDateFormat ("yyyy-MM-dd");
		String input = args.length == 0 ? "1818-11-11" : args[0];
		System.out.print(input + " parses as ");
		Date t;
		try {
			t = formatter.parse(input);
			System.out.println(t);
		} catch (ParseException e) {
			System.out.println("unparseable using " + formatter);
		}