Reverted to using date-formatting, resulting in correct date filtering - but rather slow runtime.