Hi -- what version of InfoPath are you using? 2003 or 2007? They differ, so if you have to use code, it will help anyone who helps you to know that....
For example, if you are using InfoPath 2007, you can use something like this:
//create a variable for the first Monday
DateTime monday;
//get the value of today
DateTime startDate = DateTime.Now;
//get the first day in September using the year from that date
DateTime septOne = new DateTime(startDate.Year, 9, 1);
//is it a Monday? If so, we are done
if (septOne.DayOfWeek == DayOfWeek.Monday)
{
monday = septOne;
}
//otherwise we need to do a little date math
else
{
monday = septOne.AddDays(8 + (0 - septOne.DayOfWeek));
}
//set another field to the first Monday in Sept
XPathNavigator nav = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:FirstMonday", NamespaceManager);
nav.SetValue(monday.ToString());