Informatica - Get Date of Monday of a Week number

1.6k views Asked by At

How to calculate the Monday date of a week using the week number in Informatica?!

1

There are 1 answers

1
baliman On
// 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();