Boris Borcic
1/30/2008 1:45:00 PM
washakie wrote:
> Hello,
>
> I have a list of datetime objects: DTlist, I have another single datetime
> object: dt, ... I need to find the nearest DTlist[i] to the dt .... is
> there a simple way to do this? There isn't necessarily an exact match...
>
> Thanks!
> .john
>
min(DTlist,key=lambda date : abs(dt-date))