He did not. If you read it in some news article, please do yourself a favor and do not use this news source anymore. If somebody of your friends told you that, please keep loving them as friends but accept anything they say with a grain of salt as they may be more gullible than you thought.
What Trump actually said is that his opponents suggestion that he doesn't do enough to counter the epidemic is the next hoax (previous one obviously being, in his opinion, the impeachment proceedings). This is somewhat unusual application of word "hoax", as "hoax" usually refers to false statement of fact, and whether Trump is doing a good job is not a fact but an opinion, which you can disagree with but it can't be "hoax". What he obviously meant is that his opponents unjustifiedly accuse him of doing poor job, and he expressed it in the usual Trumpian manner, sacrificing precision for expressiveness. What he didn't ever say is that the epidemic itself is a "hoax" and everybody that told you he did, unfortunately, lied to you, either knowingly (because they hate Trump and think it's ok to sacrifice the truth for the noble goal of getting rid of Trump, somehow thinking when they do it, as opposed to Trump doing it, it's ok) or unknowingly (being deceived by the former kind).
This is one of the examples of how tribal things are. All Trump says is available in transcripts. Not many - especially from the opposing tribe - bother to read them and actually know what he says before forming (or, rather, confirming the pre-existing) opinion on the matter.
You can get the words e.g. here: https://www.snopes.com/fact-check/trump-coronavirus-rally-re... - I choose a source that is not in Trump's tribe so that there was no doubt their conclusion that Trump didn't say coronavirus is a hoax is not tribally motivated.