In article <ssZ9p.10276$5v7.5...@newsfe11.iad>, s...@uce.gov wrote:
> When I do:
> 
>      datetime.datetime.now().isoformat(' ')
> 
> I get the time with the microseconds. The docs says:
> "if microsecond is 0 YYYY-MM-DDTHH:MM:SS+HH:MM".
> 
> How do I set microsecond to 0?

>>> datetime.datetime.now().replace(microsecond=0).isoformat()
'2011-02-25T18:48:24'

-- 
 Ned Deily,
 n...@acm.org

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to