"Sara Khalatbari" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > 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 -- http://mail.python.org/mailman/listinfo/python-list