March 28, 201114 yr I would like to create a script that,given a value of WeekOfYear, creates seven new records, and populates the date fields with dates that correspond to the WeekOfYear. For example, for WeekOfYear 14, 2011, the new records would have the dates 3/27/11, 3/28/11, 3/29/11, 3/30/11, 3/31/11, 4/1/11 and 4/2/11.
March 28, 201114 yr Hint: The Sunday on or before Jan. 1 is the starting day of week 1. The starting day of week x is 7*(x - 1) days later.
March 30, 201114 yr Author Hint: The Sunday on or before Jan. 1 is the starting day of week 1. The starting day of week x is 7*(x - 1) days later. Thanks for the tip. I'm not sure why the formula works, but it works beautifully! And simple too! John
Create an account or sign in to comment