The creation date of a fileis accessed using the os.path and time libraries.
import os.path, time time.ctime(os.path.getctime("test.txt"))
This code example accesses the time of the test.txt file using the os.path library. That time is formatted using the time module. The resulting string is written in the output for rendering.
import os.path, time print("created: %s" % time.ctime(os.path.getctime("test.txt")))
$ py test.py created: Wed Jul 4 14:42:37 2018