Conditional formulas

I am trying to construct a conditional formula to do the following:

Calculate the number of days between 2 dates. If cell A1 (starting date) is blank, then return "0". If cell B1 (end date) is blank then return the number of days between A1 and today's date.

Answer for Conditional formulas

I think it will be ok.

=IF(A1="","0",IF(B1="",TODAY()-A1,B1-A1))

Perfect. Thank you!

Perfect. Thank you!