Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django tempalte tag datetime to timestamp

{% now "U" %}

The "U" is a date format for Unix epoch, and can also be used with built-in date filter. So, if you have the date in a variable:

{{ value|date:"U" }}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #tempalte #tag #datetime #timestamp
ADD COMMENT
Topic
Name
1+5 =