Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76246

Re: how to change the time string into number?

Date 2014-08-13 21:01 -0500
From Tim Chase <tim@thechases.com>
Subject Re: how to change the time string into number?
References <53EC14EC.2090503@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.12955.1407981761.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 2014-08-14 09:46, luofeiyu wrote:
> s="Aug"
> 
> how can i change it into 8 with some python time module?

 >>> import time
 >>> s = "Aug"
 >>> time.strptime(s, "%b").tm_mon
 8

works for me.

-tkc

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: how to change the time string into number? Tim Chase <tim@thechases.com> - 2014-08-13 21:01 -0500

csiph-web