How to Get Current Date and Time in Django

rafiqul
Rafiqul Hasan
Published on Jan, 18 2024 1 min read 0 comments
image
import datetime

datetime.date.today()  # Returns 2018-01-15

datetime.datetime.now() # Returns 2018-01-15 09:00
0 Comments