Hi J.,
I'm sorry to hear your husband is having this surgery. I hope you are OK.. and yes, you need to tell your daughter the truth. (Dania's advice about explaining everything is great.)
One thing I can offer... is to make a calender. I had several surgeries when my kids were young. I bought a calender with big spaces, and drew pictures, (Mommy in the car waving bye, Mommy in a bed in the hospital, Mommy with doctors who had masks on, Mommy in bed with flowers, and finally Mommy back in the car coming home. We added a couple of days with Mommy in bed at home, with the girls with me) My husband and I explained all the days' pictures, and my husband was able to answer the "when is Mommy coming home" questions with the help of the calender.
It really helped them to have a visual image of the passage of time, ( also we referred to the days as "wake-ups) and I'd be home after so many wake-ups. You might want to add several "in hospital" days to the expected coming home... just in case. It's better for Daddy to get home earlier than expected, rather than later.
Basic explanations of truth, and the visual of the calender should help. ( the calender works for business trips too)
again, remember to take care of yourself too... It's a stressful time for both you and your daughter, and I hope your husband has a speedy recovery.
Val