Re: date to digit
- From: "Fabio Pliger" <fabio.pliger@xxxxxxxx>
- Date: Sat, 30 Apr 2005 14:26:21 GMT
"Sara Khalatbari" <sarapythonlist@xxxxxxxxx> ha scritto nel messaggio
news:mailman.57.1114858019.14961.python-list@xxxxxxxxxxxxx
> Is there a program in python that inputs a date & a
> time, for example: "2005-04-17 04:20+0000". And
> returns a digit, for example: "3501" instead?
>
> and if there is such program or built-in function, how
> can I run it inside a code?
Here you go:
>>> a = time.strptime("2005-04-17 04:20", "%Y-%m-%d %H:%M")
>>> time.mktime(a)
1113704400.0
F.P.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
.
- References:
- date to digit
- From: Sara Khalatbari
- date to digit
- Prev by Date: Re: Python Challenge ahead [NEW] for riddle lovers
- Next by Date: Re: Fwd: how to find the drive in python/cygwin?
- Previous by thread: Re: date to digit
- Next by thread: Tkinter app=App(root) problem
- Index(es):
Relevant Pages
|