get the creating date of files ftp python code example
Example 1: get the creating date of files ftp python
from datetime import datetime
print datetime.strptime(modifiedTime[4:], "%Y%m%d%H%M%S").strftime("%d %B %Y %H:%M:%S")
# prints something like 01 January 1970 09:30:01
Example 2: get the creating date of files ftp python
connection = ftplib.FTP(**ftpCredentials)
modifiedTime = connection.sendcmd('MDTM ' + fileName)
# successful response: '213 20120222090254'