<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_datetime_properties(self, recursive=True):
 """ Returns a dict of property.path and property. :param recursive the name of the property :returns a dict """

        res = {}
        for name, field in self.properties.items():
            if isinstance(field, DateField):
                res[name] = field
            elif recursive and isinstance(field, ObjectField):
                for n, f in field.get_datetime_properties(recursive=recursive):
                    res[name + "." + n] = f
        return res