date and time auto datatype calculation