Each instance in the dataset (or model) will have a _created_on attribute, which is of the datetime data type. This function should identify the instance that was created first. You can use the following code snippet to extract the necessary information:
for item in data:
dt = item._created_on
year, month, day = dt.year, dt.month, dt.day
hour, minute, second = dt.hour, dt.minute, dt.second
Each instance in the dataset (or model) will have a
_created_on
attribute, which is of thedatetime
data type. This function should identify the instance that was created first. You can use the following code snippet to extract the necessary information: