new date time conversion function