This cannot be answered with a single answer, since DateTime values depend on many parameters.
I suggest to go through this learning path to understand how Mendix handles DateTime values on the various locations; https://academy.mendix.com/link/module/374/lecture/3046/7.1-Introduction
The functions parseDateTimeUTC() and formatDateTimeUTC() expect a format as second parameter, e.g. yyyy-MM-dd. This helps you to compare as dates.