$time = time(); $datefilter = strtotime(date('Y-m-d', $time).' -2 weeks'); $c = $modx->newQuery('modUser'); $c->innerJoin('modUserProfile','Profile'); $c->where(array('Profile.dob:lt' => $datefilter)); $c->select(array('modUser.*, Profile.dob')); $users = $modx->getCollection('modUser', $c);