If you're an adult, don't use this phrase. Kids can use it, but grown-ups just stick with "I need to go the restroom" or similar.
Check out this group of Chinese phrases too. You might find more useful Mandarin phrases. The current Chinese phrase "I have to p*ee" appears in this group