Skip to main content

date_from_datetime

No overview available.

def date_from_datetime(
dt: datetime
) - > date

Extracts the date component from a datetime object. This is used to strip time information when only the calendar date is required for comparisons or storage.

Parameters

NameTypeDescription
dtdatetimeThe datetime instance from which the date component will be extracted.

Returns

TypeDescription
dateA date object representing the year, month, and day of the input datetime.