Falling and Rasing Edge Detector
Here's the general idea about edge detectors: -



Three examples all of which use an RC to slightly delay one input to the gate (schmitt input type gate of course).


  But 74HCT04 gives only inverse of input, it doesn't give any delay.


Oh yes it does, read the data sheet (it tells you that the propagation delay is about 7 ns on a 5V supply) and, if you want more delay add more inverters: -



Or this: -



If you just want a positive edge detector use the 2nd circuit in your question with an odd number of gates.