You can leave a diaper for 6 hours if the baby or child is sleeping.
Although if the baby or toddler or child is awake then you should not leave the diaper 6 hours.
Babies and toddlers pee more through the day and may poop more during the day as well.
So babies and toddlers need their diapers changed more often through the day to keep them clean, dry and healthy.
Poop diapers should be changed as soon as you notice it but it's a good idea to wait at least 5 to 10 minutes after the baby or toddler has pooped so that you can be sure they finished.
Then after that time the diaper should be changed and you should wipe them good.
As for wet diapers you should aim to change the wet diapers every 2 to 3 hours or every 4 hours for older toddlers such as 2 to 3 year olds.
Older toddlers that are 2 to 3 often pee less often and may have dry diapers for a long stretch and then pee in the diaper at once.
At night it's okay to allow the baby or toddler to sleep through the night in the same diaper but you should ideally put some diaper rash cream on them to help protect their skin.
Although diapers now say up to 12 hours of protection and even say for the day it's not healthy to let the child stay in the same diaper in the daytime for 12 hours or longer than 6 hours unless it is not wet or dirty and in that case it is likely the child is ready to potty train.
Diapers can be left on for 12 hours at night if the baby or toddler sleeps that long but in the day the diapers should be changed for comfort and hygiene.