A little more details would help... does it do this when the engine is hot or cold, or does it make any difference?
Also, did you see the check engine light on (when the engine was running?)
NOTE: The most common issue to cause hard/no start on the 350-Z (VQ35DE engine) is a faild CMP (Camshaft position sensor) this will be evident by stored code P0340 (bank # 1) or P0345 (bank # 2)
#1. Change the fuel filter first.
#2. Ask the dealer of the car to test the fuel pressure on the fuel rail pressure fitting. This is a very inexpensive test BUT the fuel filter must be clean to get an accurate fuel pressure reading.
If pressing the gas pedal helps, then I'd take a serious look at the engine coolant temp sensor. When that gives the wrong reading, the computer provides too lean a mixture for starting. Depressing the pedal tells the computer to add more gas--that's the clue the mixture isn't right.
Or, you have a vacuum leak or dirty idle air control valve.
Check your clamps on the top of the battery. Make sure they are tightened properly. Might have to replace completely. I had a similar problem and when i replaced them it started up fine.
I have a 2004 Nissan 350z and my car is cranking but not starting. It isn't the battery for a fact. And sometimes hitting the gas pedal helps it turn on. Any idea what it could be?