Difference-in-differences with two treatments I have two groups.
Group 1 received intervention A and Group 2 received intervention B. I'm interested in seeing if intervention A is more effective than intervention B. People cannot be enrolled in both interventions at the same time.
Am I able to use difference-in-differences to compare the two interventions, or would I need to include a third group where the people receive no intervention (control group)? What I have are the dates in which someone enrolled in their respective intervention and the pre-enrollment and post-enrollment outcomes. The outcome was measured every 3-6 months pre-enrollment and every 3-6 months post-enrollment.
Also, since people can enroll in any of the interventions at different times, I would like to standardize the time dimension as the number of days before and after enrollment into the intervention. If I were to include a third group, how would I standardize time since there is no enrollment?


Am I able to use difference-in-differences to compare the two interventions, or would I need to include a third group where the people receive no intervention (control group)?

In general, a baseline group of individuals that never experience either of the two interventions is ideal. And including the two intervention groups in a single regression equation will make it easier to assess for differences between the two treatments.

The outcome was measured every 3-6 months pre-enrollment and every 3-6 months post-enrollment.

It appears individuals may opt into either of the two interventions, but not both. The interventions are therefore disjoint, so there's no reason to interact the two treatment variables. Note also that the "post-periods" vary across individuals, and so you should use the more general framework for difference-in-differences testing. Review the top answer here to help you get going.

Also, since people can enroll in any of the interventions at different times, I would like to standardize the time dimension as the number of days before and after enrollment into the intervention.

You didn't say why you're doing this, but if I may wager a guess, it's probably to do some sort of event study analysis and/or coefficient plotting. This makes sense given the context. To do this correctly, each treated individual is some number of days before or after their first day of treatment. Most refer to this practice as "centering" the treated units around the immediate intervention period.

If I were to include a third group, how would I standardize time since there is no enrollment?

You don't.
In settings with binary (i.e., 0/1) treatments, the controls remain consistently 0 for all days pre- and post-intervention. We have no reliable way to determine when the unexposed group would have entered into treatment. To see this visually, review my answer here. Note the fake data frame used for illustrative purposes; the first item (unit) is 0 in all periods.
