I have a file sorted by date / time in csv form, for example below, for which I do the calculations. I want my code to stop counting that day as soon as a certain time has passed. for example, no more if time> 20:00. time does not change every day. Sample data:
Date Time Open High Low Close Volume
02/01/2015 14:30:00 111.39 111.44 111.2 111.24 707185
02/01/2015 14:31:00 111.24 111.3 111.14 111.3 286506
I tried to define endTime, then I say when time> endTime ... sentences appreciated ..
endTime = datetime(int(datetime.now()), int(datetime.now()), int(datetime.now()), 15, 30, 00)
TypeError: int() argument must be a string or a number, not 'datetime.datetime'
endTime = datetime.time(hour=20, minute=00, second=00)
TypeError: descriptor 'time' of 'datetime.datetime' object needs an argumen
Ron source
share