add a function to get the start or end date of a model