OK, here is a formula.
I like Automations, but I prefer to avoid them if a simple formula will work.
Here is the formula to create on the detail time records and then the relationship to the time period table would be based on this field.
// first we gather up the ingredients for our final formula
var text YYYY = ToText(Year([Date]));
var text MM = PadLeft(ToText(Month([Date])),2,"0");
var number DayOfMonth = Day([Date]);
var text FirstSecond = If(
$DayOfMonth <=15,"1",
$DayOfMonth >=16,"2");
// now we assemble the ingredients
$YYYY & $MM & "-" & $FirstSecond