Fixed #3133 Switch where clause operator for to (end) datetime; props @ben72