public Integer countWeekday(Date startDate) {



I have this function and a parameter passed to it.
setHours,setMinutes and setSeconds are deprecated.
What else can i use?

Use java.util.GregorianCalendar instead of Date.
This class does days, weeks, months etc properly, and is the reason why the old methods in the Date class were deprecated.

ps: When you look at the javadoc for GregorianCalendar you'll find all the interesting methods are inherited from the abstract class Calendar, so don't forget to look there as well.

If you read the JavaDoc for Calendar and GregorianCalendar you will find comprehensive examples right in the first section.

What is the format of date and time when you insert into Oracle Database?
At me, only dis format works. eg : 14-FEB-2011


hmmmm as I see you totally ignored more that 100.examples about Date & Calendar, good to know

on pages that I send link is complete Sql-92 + Oracle-Sql manual