Urine for pregnancy test

How long can urine last for a accurate pregnancy test? I saved my urine in a container this morning and I’m finally getting around to do a test