Re: [Tutor] Simple Question On A Method (in subclass)

2011-10-26 Thread Prasad, Ramit
>I want to make >sure you guys, especially Alan & Dave, are appreciated for taking their >own personal time to do this, for free. Your bill will arrive shortly ;) Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 -

Re: [Tutor] 12 hr to 24 hr time conversion

2011-10-26 Thread Joel Goldstick
On Wed, Oct 26, 2011 at 4:46 AM, Praveen Singh wrote: > How can i convert this- > > >>>time24hr('12:34am') > '0034hr' > > i searched in date module but i am not able to figure out what how to do > this... > > > > > ___ > Tutor maillist - Tutor@python.

Re: [Tutor] 12 hr to 24 hr time conversion

2011-10-26 Thread Alan Gauld
On 26/10/11 09:46, Praveen Singh wrote: How can i convert this- >>>time24hr('12:34am') '0034hr' i searched in date module but i am not able to figure out what how to do this... In the time module you can use strptime to convert a string to a tuple. And you can use strftime to convert a tuple

Re: [Tutor] 12 hr to 24 hr time conversion

2011-10-26 Thread Peter Otten
Praveen Singh wrote: > How can i convert this- > time24hr('12:34am') > '0034hr' > > i searched in date module but i am not able to figure out what how to do > this... >>> time.strftime("%H:%M", time.strptime("12:34am", "%I:%M%p")) '00:34' >>> datetime.datetime.strptime("12:34am", "%I:%M%p

Re: [Tutor] 12 hr to 24 hr time conversion

2011-10-26 Thread Raúl Cumplido
Hi Praveen, Do you want to create the functon time24hr which with a string as an argument of the type ("12:24am") or ("12:24pm") returns an output of ("0024hr") or ("1224hr"), right? Is this format fixed? I mean, can you create a two arguments function? (i.e time24hr("12:24", "AM") ) If you cann

[Tutor] 12 hr to 24 hr time conversion

2011-10-26 Thread Praveen Singh
How can i convert this- >>>time24hr('12:34am') '0034hr' i searched in date module but i am not able to figure out what how to do this... ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailm