<jupyter_start><jupyter_text>Use `datetime.strptime()` to extract date information<jupyter_code>from datetime import datetime

date = '13-Sep-39'

day = datetime.strptime(date, '%d-%b-%y').day
month = datetime.strptime(date, '%d-%b-%y').month
year = datetime.strptime(date, '%d-%b-%y').year

print("The date is {}th, the month number is {} and the year is {}".format(day, month, year))<jupyter_output>The date is 13th, the month number is 9 and the year is 2039
{'fraction_non_alphanumeric': 0.16052060737527116, 'fraction_numerical': 0.02386117136659436, 'mean_word_length': 5.416666666666667, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '503490', 'license': 'MIT', 'n_tokens_mistral': 172, 'n_tokens_neox': 162, 'n_words': 48, 'path': 'python/general/Datetime.ipynb', 'repo_name': 'Egimba/Code-Snippets', 'size': '461'}