Hi Anna, You might like to take a look at the Apache Jakarta Commons Validator stuff. Obviously if you just want to validate a date it's overkill, but there is lots of other helpful stuff in there you might find useful. www.jdocs.com/page/LibraryContents?id=46&c=C ----- Original Message ----- From: Anna Giller To: program-java@xxxxxxxxxxxxx Sent: Friday, January 23, 2009 4:39 AM Subject: [program-java] date validation Jim: Do you have a date validation routine? I have one, it's ugly enough. It checks the value of the month, then the value of the day, compares it with the array of valid values. I need more professional one, that uses Java classes. I was also looking for a numeric field validation, but just found one. And want to share it with our people. It's neat, isn't it? I'm looking for a date validation routine in the similar style. Thank you and the code follows. Anna int number=0; while (number == 0) { String input=JOptionPane.showInputDialog("\n\tEnter numeric value."); try{ number=Integer.parseInt(input); }catch(NumberFormatException nfe) { Number = 0; }