I got this working, thanks:
source value:
import csv import datetime csv1 = ('c:\data\opt\csv1.csv') csv2 = ('c:\data\opt\csv2.csv') source = csv.reader(open(csv1,'rb')) lookup = csv.reader(open(csv2,'rb')) for data in lookup: lkeml = data[0] lkdt = datetime.datetime.strptime(data[1],"%d/%m/%y") for data1 in source: srceml = data1[0] srcdt = datetime.datetime.strptime(data1[1],"%d/%m/%y") if lkeml in srceml and lkdt > srcdt: print lkeml+"," +str(lkdt)It identifies matches but the date includes time stamp even though it's not included in the formatting. I've had a look but can't find a specific method just for date, what am I missing?
source value:
[email protected], 2017/02/02example output:
Output:[email protected],2017-02-02 00:00:00
Thanks