add note regarding datetime docs (#72976)

Adds a note pointing to the datetime documentation as to_datetime does not use the time library but instead uses datetime.
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
This commit is contained in:
Sascha Marcel Schmidt 2021-01-08 16:47:23 +01:00 committed by GitHub
parent d83200c530
commit 61f0d6b919
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1660,6 +1660,8 @@ To get a date object from a string use the `to_datetime` filter::
# get amount of days between two dates. This returns only number of days and discards remaining hours, minutes, and seconds
{{ (("2016-08-14 20:00:12" | to_datetime) - ("2015-12-25" | to_datetime('%Y-%m-%d'))).days }}
.. note:: For a full list of format codes for working with python date format strings, see https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior.
.. versionadded:: 2.4