1 2 3 4 5 6
|
from datetime import datetime as dt insert = dt.strptime('2018-03-22 10:00:00', "%Y-%m-%d %H:%M:%S") current = dt.strptime(str(dt.now().strftime('%Y-%m-%d')), '%Y-%m-%d') print (current-insert).days print (current-insert).seconds print (current-insert).microseconds
|
近期评论