>>> import time
>>> import datetime
>>> s = "01/12/2011"
>>> time.mktime(datetime.datetime.strptime(s, "%d/%m/%Y").timetuple())
1322697600.0
More Related Contents:
- Converting between datetime, Timestamp and datetime64
- Iterating through a range of dates in Python
- How to construct a timedelta object from a simple string
- Combine Date and Time columns using python pandas
- Parsing date with timezone from an email?
- How to increment datetime by custom months in python without using library [duplicate]
- pandas datetime to unix timestamp seconds
- Convert timedelta to years?
- Check if string has date, any format
- Formatting timedelta objects [duplicate]
- python pandas extract year from datetime: df[‘year’] = df[‘date’].year is not working
- How to convert a python datetime.datetime to excel serial date number
- matplotlib bar chart with dates
- How to add timezone into a naive datetime instance in python [duplicate]
- Parsing datetime in Python..?
- Python Pandas Group by date using datetime data
- Convert numpy.datetime64 to string object in python
- Removing the timestamp from a datetime in pandas dataframe
- Subtract a year from a datetime column in pandas
- Pythonic difference between two dates in years?
- Get the Olson TZ name for the local timezone?
- Pandas: How to create a datetime object from Week and Year?
- Plotting dates on the x-axis
- Convert date to datetime in Python
- How to convert epoch time with nanoseconds to human-readable?
- Python pandas integer YYYYMMDD to datetime
- Convert a column of timestamps into periods in pandas
- Python: Adding hours to pandas timestamp
- how to specify the datetime format in read_csv
- Python generating a list of dates between two dates