when
can be added to a whole pattern, not to nested patterns, so you need something like this:
match (startDate, endDate) with| d, e when d = DateTime.MinValue && e = DateTime.MinValue -> 0| _ -> 1
Note that in this case, pattern matching is not really necessary, and you can go for a simpler if:
if d = DateTime.MinValue && e = DateTime.MinValue then 0else 1