My date is in the format DD/MM/YYYY HH:MM:SS
, ie 16/08/2013 09:51:43
. How can I convert the date into python seconds using total_seconds()
or using any other python function?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Here's how you can do it:
Also see Python Create unix timestamp five minutes in the future.
Seconds since when?
See this code for general second computation:
UPDATE: if you need unix timestamp (i.e. seconds since 1970-01-01) you can use the language default value for timestamp of 0 (thanks to comment by J.F. Sebastian):