Re: Format a timedelta object

2016-05-27 Thread Pete Forman
Steven D'Aprano writes: > On Thu, 26 May 2016 03:28 pm, Zachary Ware wrote: > >> On Thu, May 26, 2016 at 12:16 AM, Steven D'Aprano >> wrote: >>> I have a timedelta object, and I want to display it in a nice >>> human-readable format like 03:45:17 for "three hours, forty five minutes, >>> 17 seco

Re: Format a timedelta object

2016-05-27 Thread Zachary Ware
On Fri, May 27, 2016 at 11:21 AM, Steven D'Aprano wrote: > On Thu, 26 May 2016 03:28 pm, Zachary Ware wrote: >> On Thu, May 26, 2016 at 12:16 AM, Steven D'Aprano >> wrote: >>> I have a timedelta object, and I want to display it in a nice >>> human-readable format like 03:45:17 for "three hours, f

Re: Format a timedelta object

2016-05-27 Thread Steven D'Aprano
On Thu, 26 May 2016 03:28 pm, Zachary Ware wrote: > On Thu, May 26, 2016 at 12:16 AM, Steven D'Aprano > wrote: >> I have a timedelta object, and I want to display it in a nice >> human-readable format like 03:45:17 for "three hours, forty five minutes, >> 17 seconds". >> >> Is there a standard wa

Re: Format a timedelta object

2016-05-25 Thread Marko Rauhamaa
Steven D'Aprano : > I have a timedelta object, and I want to display it in a nice > human-readable format like 03:45:17 for "three hours, forty five > minutes, 17 seconds". > > Is there a standard way to do this? >>> import datetime >>> td = datetime.timedelta(hours=3, minutes=45, seconds=1

Re: Format a timedelta object

2016-05-25 Thread Zachary Ware
On Thu, May 26, 2016 at 12:16 AM, Steven D'Aprano wrote: > I have a timedelta object, and I want to display it in a nice human-readable > format like 03:45:17 for "three hours, forty five minutes, 17 seconds". > > Is there a standard way to do this? >>> timedelta(100) datetime.timedelta(100

Format a timedelta object

2016-05-25 Thread Steven D'Aprano
I have a timedelta object, and I want to display it in a nice human-readable format like 03:45:17 for "three hours, forty five minutes, 17 seconds". Is there a standard way to do this? -- Steve -- https://mail.python.org/mailman/listinfo/python-list