You can use the dateTimeToEpoch functions to convert your datetimes to decimal/integer values. Then do your calculation and change it back to a dateTime afterwards.
For example, this would give you the average of two dates:
epochToDateTime(round((dateTimeToEpoch($date1) + dateTimeToEpoch($date2)) div 2))