You can use strptime
in the datetime
package of Python:
>>> import datetime
>>> datetime.datetime.strptime('24052010', "%d%m%Y").date()
datetime.date(2010, 5, 24)
More Related Contents:
- How to calculate number of days between two given dates
- Iterating through a range of dates in Python
- Add missing dates to pandas dataframe
- How to subtract a day from a date?
- Creating a range of dates in Python
- Convert Excel style date with pandas
- How do I get a value of datetime.today() in Python that is “timezone aware”?
- Difference between two dates in Python
- Get month name from number
- Extracting date from a string in Python
- How do I validate a date string format in python?
- How to convert a given ordinal number (from Excel) to a date
- Find the closest date to a given date
- python/pandas: convert month int to month name
- Python module to change system date and time
- Python: give start and end of week data from a given date
- python date of the previous month
- Pandas – Number of Months Between Two Dates
- Add one year in current date PYTHON
- Convert numpy.datetime64 to string object in python
- changing all dates to standard date time in dataframe
- How to convert Year and Day of Year to Date?
- Is there a function to determine which quarter of the year a date is in?
- How to tell if a date is between two other dates?
- Getting days since last occurence in Pandas DataFrame?
- Formatting “yesterday’s” date in python
- Convert string into Date type on Python [duplicate]
- Resample time series in pandas to a weekly interval
- How to combine year, month, and day columns to single datetime column?
- Get the last day of the month