0

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

Karthic
  • 1
  • 1
  • Maybe this topic will help you achieve an answer, the question is about sunday, but changing it to monday wouldn't be too hard I guess. https://community.informatica.com/message/76927 – Matheno Nov 25 '14 at 11:23

1 Answers1

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();
baliman
  • 588
  • 2
  • 8
  • 27
  • Hi Baliman, Hope you have written the logic using JAVA. Is der anyother way to do that without using JAVA transformation? – Karthic Nov 25 '14 at 12:29