Use this :-
>>> datetime.datetime.strptime('24052010', "%d%m%Y").date()
datetime.date(2010, 5, 24)
Hope this helps!!
If you need to learn more about Python, It's recommended to join Python Certification Training today.
Hello @ pagarsach,
You can convert a string to ...READ MORE
g1 here is a DataFrame. It has a hierarchical index, ...READ MORE
The parse() function in dateutil can't handle ...READ MORE
if You Want to convert int to ...READ MORE
You can also use the random library's ...READ MORE
colors = ['red', 'green', ...READ MORE
can you give an example using a ...READ MORE
You can simply the built-in function in ...READ MORE
In Python 3 (< 3.3)
From the docs ...READ MORE
replace() is a method of <class 'str'> ...READ MORE
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.