Can somebody explain the Datetime module a little bit better?
Just need help learning how to tell distance between two dates, how to tell certain things, like only the time, or only the date.
#you can play around with this from datetime import * a = datetime(2018, 8, 5) #chosen year,month,day (today of last year) b = datetime.today() #todays date daysBetween = int(list(str(b-a).split())) #this will give days between last year(specified date a) to today (b) daysTimeBetween = b-a #this will give days/time between last year (a) and today (b) print(daysTimeBetween) print(daysBetween) d = list(str(date.today()).split("-")) #store each element of todays date day = int(d) month = int(d) year = int(d) print(datetime.today()) #todays date and time print(day, month, year) https://www.w3schools.com/JUMP_LINK__&&__python__&&__JUMP_LINK/python_datetime.asp
Print(datetime.__doc__) Print(help(datetime)) This should be enough
Jake you forgot to import the actual datetime from datetime