I am simply trying to write the day of the week in my CoarseSelectionFilter():

def Initialize(self):
self.SetStartDate(1998, 1, 1)
self.SetEndDate(1998, 3, 1)

self.MinPriceForSelectionFilter = 10.0
self.NumAssets = 10


# what resolution should the data *added* to the universe be?
self.UniverseSettings.Resolution = Resolution.Daily

def CoarseSelectionFilter(self, coarse):


But I get this error:

Runtime Error: AttributeError : 'datetime.datetime' object has no attribute 'DayOfWeek'
at CoarseSelectionFilter in main.py:line 24


It looks to me that Time is a .net dateTime object so I don't understand why I get this error?

ANy help is greatly appreciated.