In layman's term, what's the difference between ndb.DateProperty
and ndb.DateTimeProperty
? When would I use which? For example, my intent is to use either with the param auto_now_add=True
.
相关问题
- java.lang.NullPointerException at java.io.PrintWri
- Flush single app django 1.9
- __call__() missing 1 required positional argument:
- Upload file to Google Cloud Storage using AngularJ
- Where is the best place to put one-time and every-
相关文章
- Is there a size limit for HTTP response headers on
- Does there exist empty class in python?
- ImportError: No module named twisted.persisted.sty
- appcfg.py command not found
- Get a header with Python and convert in JSON (requ
- Google app engine datastore string encoding proble
- python unit testing methods inside of classes
- Requiring tensorflow with Python 2.7.11 occurs Imp
From the docs:
As expected, one is used if you don't need any reference to the time (eg: just the date), the other when you want the full information. When you would use one or the other completely depends on what information you need at a very precise moment.
I would say that
DateProperty
is when you want a date-part only (i.e.dd/mm/yyyy
or whatever format), andDateTimeProperty
is useful when you want a full date & time representation (i.e.dd/mm/yyyy 00:00:00
or whatever format).