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.