96 Nissan Sentra Starting Problem

My 96 Sentra intermittently has issues starting. After it starts it runs fine and restarts fine. But after it has sat for several hours it occasionally has trouble starting. I’ve replaced the fuel pump because I thought it may be the check value in the fuel pump but the problem has be baffled. Any ideas how to fix?