Hi, I am trying to find a way to obtain the week of the year for any user entered date. but each time the week of the year corresponding to todays date. Please help. Thanks, sunsel

It depends on how you define the week of the year. Will the first partial week be counted as first week? You can calculate Julian date (how many days from January 1 to that day), then use mode(days, 7) function to find out how many weeks passed. Then again, it depends on the definition.

Hi, We can create object using: Calendar cal = new Calendar(); But the problem, we'll be facing here is that we can't use the fields and methods of class GregorianCalendar which has all the important methods of date format. ------------- Nayan.

NOTE... when you are using 'c.set(Calendar.MONTH, 5);' you need to subtract 1 from the month, because the first month has the value 0. Rene [ January 08, 2003: Message edited by: Rene Larsen ]