Added some casting to support date timeRange on historized attributes and ties.