Refactoring for DatetimeField