solution is
import time
import datetime
d = datetime.date(2015,1,5)
unixtime = time.mktime(d.timetuple())
More Related Contents:
- Convert timestamps with offset to datetime obj using strptime
- How to convert integer timestamp to Python datetime
- How to convert integer timestamp into a datetime
- What exactly does the T and Z mean in timestamp?
- Python UTC datetime object’s ISO format doesn’t include Z (Zulu or Zero offset)
- Python pandas convert datetime to timestamp effectively through dt accessor
- How to combine year, month, and day columns to single datetime column?
- Creating a range of dates in Python
- Convert pandas timezone-aware DateTimeIndex to naive timestamp, but in certain timezone
- How to compare two dates?
- Plotting dates on the x-axis with Python’s matplotlib
- datetime dtypes in pandas read_csv
- Generate a random date between two other dates
- How do I get the UTC time of “midnight” for a given timezone?
- pandas dataframe groupby datetime month
- ISO time (ISO 8601) in Python
- Create a day-of-week column in a Pandas dataframe using Python
- How to add delta to python datetime.time?
- Python datetime to string without microsecond component
- Python datetime formatting without zero-padding
- How can I convert 24 hour time to 12 hour time?
- ISO to datetime object: ‘z’ is a bad directive [duplicate]
- parameter unsupported when inserting int in sqlite
- NameError: name ‘datetime’ is not defined
- Specifying date format when converting with pandas.to_datetime
- How to monkeypatch python’s datetime.datetime.now with py.test?
- Datetime conversion – How to extract the inferred format?
- What values are valid in Pandas ‘Freq’ tags?
- need to convert UTC (aws ec2) to PST in Python
- Convert dates to pd.to_datetime where month could be either a number or month name