It’s in the python docs.
import datetime
datetime.datetime.combine(datetime.date(2011, 1, 1),
datetime.time(10, 23))
returns
datetime.datetime(2011, 1, 1, 10, 23)
More Related Contents:
- Daylight saving time and time zone best practices [closed]
- 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
- Best way to store date/time in mongodb
- Parsing date with timezone from an email?
- How to increment datetime by custom months in python without using library [duplicate]
- Can’t subtract offset-naive and offset-aware datetimes
- Convert datetime to Unix timestamp and convert it back in python
- Find the closest date to a given date
- How to increment a datetime by one day?
- Datetime Timezone conversion using pytz
- How to read datetime back from sqlite as a datetime instead of string in Python?
- Convert numpy.datetime64 to string object in python
- Removing the timestamp from a datetime in pandas dataframe
- Calculate the number of weekdays between 2 dates in R
- 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?
- How do I convert an interval into a number of hours with postgres?
- How to convert epoch time with nanoseconds to human-readable?
- How to convert Python’s .isoformat() string back into datetime object [duplicate]
- Why does “%-d”, or “%-e” remove the leading space or zero?
- Python summing up time
- Ceil a datetime to next quarter of an hour
- Clean way to convert quarterly periods to datetime in pandas
- Python: Matplotlib avoid plotting gaps
- pandas extract year from datetime: df[‘year’] = df[‘date’].year is not working
- Python Pandas : pandas.to_datetime() is switching day & month when day is less than 13