infrequent urination

From what I have just recently counted my 2 year old hasn't peed in 4 hours going on to 5. She's been on constant fluids and she's also been saying she pooped and her diapers completely dry.
how long should I wait before I should take her to urgent care.