Re: how to parse string in django

2011-03-27 Thread Mike Dewhirst
On 28/03/2011 1:38pm, django beginner wrote: hi django experts, how do I strip the following string in python (Charfield format) 14:00 3:00 wherein I could compare the results - convert in integer: Further to my earlier reply ... >>> x = 3 >>> y = '%02d' % x >>> y '03' >>> if 14> 3 . .

Re: how to parse string in django

2011-03-27 Thread Mike Ramirez
On Sunday, March 27, 2011 07:38:46 pm django beginner wrote: > hi django experts, > > how do I strip the following string in python (Charfield format) > > 14:00 > 3:00 > > wherein I could compare the results - convert in integer: > > if 14 > 3 . . . > > thanks in advance! a = "14:00" b = "3:0

Re: how to parse string in django

2011-03-27 Thread Mike Dewhirst
On 28/03/2011 1:38pm, django beginner wrote: hi django experts, how do I strip the following string in python (Charfield format) 14:00 3:00 Do you also keep am and pm? What about UTC offsets? You need a helper method to interpret the numbers, convert them to seconds, do the comparison and re

how to parse string in django

2011-03-27 Thread django beginner
hi django experts, how do I strip the following string in python (Charfield format) 14:00 3:00 wherein I could compare the results - convert in integer: if 14 > 3 . . . thanks in advance! -- You received this message because you are subscribed to the Google Groups "Django users" group. To p

how to parse string in django

2011-03-27 Thread django beginner
hi django experts, how do I strip the following string in python (Charfield format) 14:00 3:00 wherein I could compare the results - convert in integer: if 14 > 3 . . . thanks in advance! -- You received this message because you are subscribed to the Google Groups "Django users" group. To p

how to parse string in django

2011-03-27 Thread django beginner
hi django experts, how do I strip the following string in python (Charfield format) 14:00 3:00 wherein I could compare the results - convert in integer: if 14 > 3 . . . thanks in advance! -- You received this message because you are subscribed to the Google Groups "Django users" group. To p