ltime = time.localtime(todayStamp) timeStr = time.strftime("%Y-%m-%d", ltime) # print datetime.datetime.fromtimestamp(todayStamp) http://www.wklken.me/posts/2015/03/03/python-base-datetime.html