I am trying to get only the date in a certain format from a file. I was able to get it working using the following code, but it gives the time, as well as the formatting is incorrect.
Any help would be appreciated.
Code
modDate = os.stat(fPath).st_mtime
print(datetime.fromtimestamp(modDate))
Output:
2018-03-01 15:48:30.149375