Here is a little script that should give you a pointer towards solving your 6 week issue.
![txnelson_0-1630889371195.png txnelson_0-1630889371195.png](https://community.jmp.com/t5/image/serverpage/image-id/35543iF55EA76008D0F254/image-size/medium?v=v2&px=400)
Names Default To Here( 1 );
// put in any date using the format of mm/dd/yyyy
inDate = "07/21/2021";
jmpDate = Informat( inDate, "mm/dd/yyyy" );
// Calculate the date 6 weeks before, and adjust to the
// Sunday prior to the absolute 6 week date
sixWeeksBefore = jmpDate - In Weeks( 6 ) - In Days( Day Of Week( jmpDate ) - 1 );
// Calculate the date 6 weeks after, and adjust to the
// Sunday following
sixWeeksAfter = jmpDate + In Weeks( 6 ) + In Days( 8 - Day Of Week( jmpDate ) );
Dialog(
"Input date is: " || Long Date( jmpDate ),
"6 weeks before is: " || Long Date( sixWeeksBefore ),
"6 weeks after is: " || Long Date( sixWeeksAfter )
);
Look in the Scripting Index for help with the different functions.
Jim