import java.text.*; import java.util.*; public class BenytSimpleDateFormat { public static void main(String[] arg) { SimpleDateFormat fmt = new SimpleDateFormat("dd/MM yyyy 'klokken' hh:mm"); Date d = new Date(); System.out.println( "I dag er: "+fmt.format(d) ); try { d = fmt.parse("24/12 2002 klokken 18:02"); System.out.println("parse gav: "+d); } catch (Exception e) { e.printStackTrace(); } } }