On Tuesday, January 31, 2017 at 12:34:38 PM UTC-8, MRAB wrote:
> On 2017-01-31 20:26, Larry Martell wrote:
> The module 'datetime' contains a class called 'datetime'. Judging by
> your exception, 'datetime' is the module.
>
> Try "datetime.datetime.strptime" instead.
This re-use of the name "da
On Tue, Jan 31, 2017 at 3:30 PM, Chris Angelico wrote:
> On Wed, Feb 1, 2017 at 7:26 AM, Larry Martell wrote:
>> I have a list of dicts and one item of the dict is a date in m/d/Y
>> format. I want to sort by that. I tried this:
>>
>> sorted(data['trends'], key=lambda k:
>> datetime.strptime(k['d
On 01/31/2017 01:26 PM, Larry Martell wrote:
> I have a list of dicts and one item of the dict is a date in m/d/Y
> format. I want to sort by that. I tried this:
>
> sorted(data['trends'], key=lambda k:
> datetime.strptime(k['date_time'],'%m/%d/%Y'))
>
> But that fails with:
>
> Exception Type:
On 2017-01-31 20:26, Larry Martell wrote:
I have a list of dicts and one item of the dict is a date in m/d/Y
format. I want to sort by that. I tried this:
sorted(data['trends'], key=lambda k:
datetime.strptime(k['date_time'],'%m/%d/%Y'))
But that fails with:
Exception Type: AttributeError at /
Larry Martell wrote:
> I have a list of dicts and one item of the dict is a date in m/d/Y
> format. I want to sort by that. I tried this:
>
> sorted(data['trends'], key=lambda k:
> datetime.strptime(k['date_time'],'%m/%d/%Y'))
>
> But that fails with:
>
> Exception Type: AttributeError at
> /re
On Wed, Feb 1, 2017 at 7:26 AM, Larry Martell wrote:
> I have a list of dicts and one item of the dict is a date in m/d/Y
> format. I want to sort by that. I tried this:
>
> sorted(data['trends'], key=lambda k:
> datetime.strptime(k['date_time'],'%m/%d/%Y'))
>
> But that fails with:
>
> Exception
I have a list of dicts and one item of the dict is a date in m/d/Y
format. I want to sort by that. I tried this:
sorted(data['trends'], key=lambda k:
datetime.strptime(k['date_time'],'%m/%d/%Y'))
But that fails with:
Exception Type: AttributeError at /report/CDSEM/WaferAlignment/ajax/waChart.jso