Changing from date to datetime to preserve time

Issue #2227