import os
import datetime
def getFileAge(filename):
    #print ("File name " , filename)
    mtime=os.stat(filename).st_mtime
    #print ("Time ", datetime.datetime.fromtimestamp(mtime))
    sttime=datetime.datetime.fromtimestamp(mtime)
    return sttime

def convertDateFormate(dateinUTC):
    return datetime.datetime.fromtimestamp(dateinUTC)

#https://www.w3resource.com/python-exercises/python-basic-exercise-64.php
def getTimeforFilename(filename):
    creation_utc_time=os.path.getctime(filename)
    print (creation_utc_time)
    #print("Last modified time",os.path.getmtime(filename))
    #print("Creation time ")



# print ("File name start date and time " , getFileAge("FileAge.py"))
#filename="FileAge.py"
#print ("File name {} , and start date : {} ".format(filename,getFileAge(filename)))

import argparse
parser=argparse.ArgumentParser()
parser.add_argument("echo")
arglist=parser.parse_args()
filename=arglist.echo

#print ("File start time " , getFileAge(arglist))
print ("File name Argument : {} passed in command line  ".format(filename))

getTimeforFilename("ArgumentParserEx.py")

print ("Start time ", getFileAge(filename))
# print (parser.add_argument("echo"))

# print (parser.parse_args())
# print (parser)
