I ran into this question today when responding to a business letter. It turns out either is fine when used as an adverb. From the Grammerly blog:
A century ago, it was standard to write any time as two words in all contexts. But it’s now perfectly acceptable to write anytime as one word when you’re using it as an adverb. However, some readers still consider it a casualism, so you may want to stick to the two-word version for extremely formal writing.
- When in doubt, write any time as two words. It might look a little old-fashioned, but it won’t be wrong.
- Anytime is an adverb that means “whenever” or “at any time.” You can use it like you would any other adverb: Call me anytime. Call me often. Call me quickly.
- You can’t use anytime with a preposition like at. If you have a preposition, you need the two-word version: They could call at any time.
- You also need the two-word version when you’re talking about an amount of time: Do you have any time to speak to us today? Continue here...