The particular format for strptime
:
datetime.datetime.strptime(string_date, "%Y-%m-%d %H:%M:%S.%f")
#>>> datetime.datetime(2013, 9, 28, 20, 30, 55, 782000)
More Related Contents:
- Convert python datetime to epoch with strftime
- How to parse dates with -0400 timezone string in Python?
- Creating a range of dates in Python
- How do I calculate the date six months from the current date using the datetime Python module?
- 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
- 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
- How to convert a timezone aware string to datetime in Python without dateutil?
- Print all day-dates between two dates [duplicate]
- How can I filter a date of a DateTimeField in Django?
- Python datetime object show wrong timezone offset
- How to add delta to python datetime.time?
- Convert timedelta to total seconds
- Python datetime to string without microsecond component
- How can I convert 24 hour time to 12 hour time?
- ISO to datetime object: ‘z’ is a bad directive [duplicate]
- Converting between datetime and Pandas Timestamp objects
- unexpected results converting timezones in python
- 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?
- How to get the seconds since epoch from the time + date output of gmtime()?
- Datetime conversion – How to extract the inferred format?
- Parsing a date that can be in several formats in python
- Python: Adding hours to pandas timestamp
- Python generating a list of dates between two dates