Many thanks
I have found something myself using time instead but i think yours is more readable (isn't it always the way that you think of an answer just after posting)
Just in case anyone is interested
Code:
import time
today=time.time()
lastweek=time.gmtime(today-(7*3600*24) # days * sec in 24H
date=time.strftime("%Y-%m-%d")
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.