- datetime
- now
- date
Convert datetime object to date object
examples/datetime/convert_datetime_to_date.py
import datetime ts = datetime.datetime.now().date() print(ts) # 2023-01-19
import datetime ts = datetime.datetime.now().date() print(ts) # 2023-01-19