import tkinter as tk
from tkcalendar import DateEntry
window = tk.Tk()
DateEntry(window, date_pattern='mm/dd/yyyy').pack() # custom formatting, mm/dd/yyyy
DateEntry(window, locale='en_US').pack() # default formatting
window.mainloop()
# This block is a pre-setup for retrieving datetime format in German
import os
import locale
if os.name == 'nt': # if windows
locale.setlocale(locale.LC_ALL, 'deu_deu')
else:
locale.setlocale(locale.LC_TIME, 'de_DE.UTF-8')