Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Cannot seem to use import time and import datetime in same script in Python

from time import *
import time as t
from datetime import *
import datetime as dt

secs=6969
print (dt.timedelta(seconds=secs))
now = datetime.now()

#Time
current_time = now.strftime("%H:%M:%S")
print("Current Time =", current_time) 

#converting
conversion = dt.timedelta(seconds=secs)
print("Converted: ", conversion)

#sleep function
t.sleep (10)
 
PREVIOUS NEXT
Tagged: #Cannot #import #time #import #datetime #script #Python
ADD COMMENT
Topic
Name
1+1 =