convert datetime object to date to allow comparision and fix the TABLE 5 thing