In oracle, check the week number of the system. The week number of the year is www.2cto.com select to_char (sysdate, 'ww '), to_char (sysdate, 'iw ') from dual; select to_char (sysdate, 'ddd ') from dual; select TRUNC (SYSDATE, 'mm') from dual; 1) The ww algorithm starts from the first week every year on January 1, January 1, date + 6 is the end of each week. For example, 20050101 is the first day of the first week, and the last day of the first week is 20050101 + 6 = 20050107 formula: the first day of each week: date + week * 7-7 last day of each week: date + week * 7-12) the iw algorithm calculates a week from Monday to Sunday, and the first Monday of each year is the first week, for example, 20050101 is Saturday, so the iw algorithm is 53 weeks of the year before, and 20050103 The beginning of the first week. Formula: First day of each week: next_day (date) + week * 7-7 last day of each week: next_day (date) + week * 7-13) www.2cto.com others: a. Check the week when "this month" is selected TO_CHAR (SYSDATE, 'ww ')-TO_CHAR (TRUNC (SYSDATE, 'mm'), 'ww ') + 1 AS "weekOfMon" from dual; or SELECT TO_CHAR (SYSDATE, 'w') AS "weekOfMon" from dual; b. Check the week number of this year for select to_char (sysdate, 'ww ') from dual; or select to_char (sysdate, 'iw') from dual; count the day of the week of the year: int year = 2011; int week = 1; Calendar calFirstDayOfTheYear = new GregorianCalendar (year, Calendar. JANUARY, 1); calFirstDayOfTheYear. add (Calendar. DATE, 7 * (week-1); int dayOfWeek = calFirstDayOfTheYear. get (Calendar. DAY_OF_WEEK); Calendar calFirstDayInWeek = (Calendar) calFirstDayOfTheYear. clone (); calFirstDayInWeek. add (Calendar. DATE, calFirstDayOfTheYear. getActualMinimum (Calendar. DAY_OF_WEEK)-dayOfWeek); Date firstDayInWeek = calFirstDayInWeek. getTime (); System. out. println (the first day of year + "year" + week + "week is" + ReportDateUtil. getFromatDay (). format (firstDayInWeek); Calendar calLastDayInWeek = (Calendar) calFirstDayOfTheYear. clone (); calLastDayInWeek. add (Calendar. DATE, calFirstDayOfTheYear. getActualMaximum (Calendar. DAY_OF_WEEK)-dayOfWeek); Date lastDayInWeek = calLastDayInWeek. getTime (); System. out. println (the last day of week year + "year" + week + "is" + ReportDateUtil. getFromatDay (). format (lastDayInWeek ));