That is my code so far it says my subtraction is wrong can you point out anything I can do better.
Thanks.
Thanks.
from datetime import datetime #Function to convert date from string to dateTime def dateTimeIn(timestamp): dateTimeIn = datetime.strptime(strDateIn, "%d/%m/%Y %H:%M%S") return dateTimeIn def dateTimeOut(timestamp): dateTimeOut = datetime.strptime(strDateOut, "%d/%m/%Y %H:%M%S") return dateTimeOut #Main Program myFileIn=open("CameraIn.txt","rt") myFileOutput=open("Output.txt","rt") for lineIn in myFileIn: lineIn=myFileIn.readline() theListIn=lineIn.split(",") regIn=theListIn[0] strTimeIn=theListIn[1] myFileOut=open("CameraOut.txt","rt") for lineOut in myFileOut: lineOut=myFileOut.readline() theListOut=lineOut.split(",") regOut=theListOut[0] strTimeOut=theListOut[1] if regIn==regOut: dateTimeIn-dateTimeOut