1👍
You can use the strftime
method:
from django.utils import timezone
date = timezone.now().date()
print date.strftime("%Y/%m/%d")
# Prints '2016/02/25'
You can check out this unofficial strftime reference for more details, or the official docs here.
Source:stackexchange.com