Try This

=IF(A1="P",NOW(),"")

Just make sure you format your "Time" cell to display properly.