[Tutor] <type 'datetime.time'> Variable to String?
Bill Campbell
bill at celestial.net
Sat Feb 14 00:57:32 CET 2009
On Fri, Feb 13, 2009, Wayne Watson wrote:
>
> That's pretty much the question in Subject. I've got a date time
> variable with, for example, 15:00:00 in hh:mm:ss format, and I'd like
> to make it a string.
The easiest way is probably to use the strftime method available
on any datetime object. It uses the standard strftime expansion,
which on any Linux/Unix box will be found with ``man strftime''.
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186
Scientists are explorers. Philosophers are tourists. -- Richard Feynman
More information about the Tutor
mailing list