2007 Honda Civic - Would not start, then later did

hi, i have honda civic 2007, yesterday morning i tried to start but it didnt start, it shows the lights everything but ignition didnt start. i went to work and when came back in the evening i tried and the car started in 1st try, please help out.

Have it towed to a service shop. Something is wrong and we can’t diagnose it over the internet without a lot more information. Sorry

cooler in morning? warmer in afternoon? battery? how old is battery?

The next time the car won’t start, with the dash lights on, step on the brake pedal and shift the transmission into neutral and then try starting the engine.

If the engine starts, it points to a problem with the park/neutral safety switch.

https://www.rockauto.com/en/catalog/honda,2007,civic,1.8l+l4,1434324,electrical-switch+&+relay,neutral+safety+switch+/+range+sensor,4584

Tester

It wouldn’t hurt to clean and retighten the battery connections to see if that makes a difference.

Another possibility (of many) is worn contacts in the starter solenoid.

Did the engine turn over but fail to start, or did the engine not even turn over?