Filtering string date in dd-mm-yyyy format

Currently, we have a string date field in dd-mm-yyyy format and


Expression.property(“startDate”).greaterThan(Expression.string(currentDate))

isn’t working as expected for .e.g document with startDate 28-05-2023 returns.

From the documentation, I saw Function.strToMillis, UTC ETC work with yyyy-mm-dd format, which is something I have requested the source team to do but until it is converted, what can I do to the above query?

Yeah… comparing those two strings isn’t going to work: They will be considered in lexicographic order.

The options for getting this to work are not great. You might try one of the suggestions here: android - Convert string to date in SQLITE - Stack Overflow