Oh god... this is possibly an unpopular opinion but, I'll say it. I think if you're at the point in your life that you are concerned about the amount of time a substance is going to last, and whether people are going to be able to tell that you've used anything - you should actually just wait.
The experience will be tainted by the anxiety of that concern, and honestly, it will just be so much better when you're actually at a place in your life that you can do these things without irritating and somewhat... childish concerns like that. You'll also be mature enough to approach your usage with an exponentially lower chance of developing any kind of problem. It'll just be so much better if you wait.
If you're going to do it anyway though, as you probably are (this is a harm reduction forum, I know, I'll try to stray from just say no, just wait til you're married type advice, I know that might be a bit unwelcome) - I'd personally give yourself a day. If you absolutely have to do shit in the afternoon... give it at least 8 hours. Ketamine I'd be comfortable saying you'll be OK by 3 (although in actual fact - you'll be down by 1) but DMXE is newer, longer lasting, less predictable, consider also the chance you might like it enough to think that redosing can't be that bad a plan - and you may also think you're pretty sober when you really are not. The second best option after an entire day is doing it in the early evening, like, 7, 8 PM? And just not planning to do anything where it will matter if you've used any mind altering substances or not until the next morning. That's just IMHO, I was more reckless than this myself, I expect you might be, and you might well get away with it, but, I cannot bring myself to give any less conservative advice.