Q. What does the auto_now_add attribute in a DateTimeField do?

  • (A) Automatically updates the field every time the object is saved
  • (B) Sets the field to now when the object is first created
  • (C) Adds the current time to all records
  • (D) Updates the time daily
πŸ’¬ Discuss
βœ… Correct Answer: (B) Sets the field to now when the object is first created
Explanation: auto_now_add sets the field to the current date/time when the object is created.
Explanation by: Mr. Dubey
auto_now_add sets the field to the current date/time when the object is created.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
56
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
80%
Success Rate