1connection = ftplib.FTP(**ftpCredentials)
2modifiedTime = connection.sendcmd('MDTM ' + fileName)
3# successful response: '213 20120222090254'
4
1from datetime import datetime
2
3print datetime.strptime(modifiedTime[4:], "%Y%m%d%H%M%S").strftime("%d %B %Y %H:%M:%S")
4# prints something like 01 January 1970 09:30:01
5