Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get date and time python

from datetime import datetime

now = datetime.now().time().strftime("%H:%M:%S") # time object
date = datetime.now().strftime("%Y-%m-%d") # date object
print("date:",date)
print("time =", now)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #date #time #python
ADD COMMENT
Topic
Name
7+1 =