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


Groups > comp.lang.python > #76246 > unrolled thread

Re: how to change the time string into number?

Started byTim Chase <tim@thechases.com>
First post2014-08-13 21:01 -0500
Last post2014-08-13 21:01 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#76246 — Re: how to change the time string into number?

FromTim Chase <tim@thechases.com>
Date2014-08-13 21:01 -0500
SubjectRe: how to change the time string into number?
Message-ID<mailman.12955.1407981761.18130.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web