Modified to use datetimefield instead of  datetimefields