Informatica - 获取星期一编号的日期

时间:2014-11-25 11:13:54

标签: informatica week-number

如何使用Informatica中的周数来计算一周的星期一日期?!

1 个答案:

答案 0 :(得分:0)

// We know week number and year.
int week = 42;
int year = 2014;

// Get calendar, clear it and set week number and year.
Calendar calendar = Calendar.getInstance();
calendar.clear();
calendar.set(Calendar.WEEK_OF_YEAR, week);
calendar.set(Calendar.YEAR, year);

// Now get the first day of week.
Date date = calendar.getTime();