Yeast infection

I got diagnosed with a yeast infection and my doctor told me to take 7 day cream but they didn’t have any monistat is this ok? Currently 31 weeks.