(Python 2.4.x - I cannot install any modules including dateutil)
Here's what I have so far.
mydate=['20111025.00', '20111026.12'] start_time= time.strptime(mydate, "%Y%m%d.%H")[:5] end_time=time.strptime(mydate, "%Y%m%d.%H")[:5] for myhour in datespan(time.strptime(mydate, "%Y%m%d.%H")[:4], time.strptime(mydate, "%Y%m%d.%H")[:4], delta=datetime.timedelta(hours=1)): print myhour
What I'm trying to do is take the two values in mydate list - and show all hours inbetween the two values given. in the above example it would (or should) show.
Problem with the above code is it tells me.
can only concatenate tuple (not "datetime.timedelta") to tuple
Just can't make heads or tails out of it. Any suggestions?