If you want to set the color to red if the due date is greater than today, then the color property of the date label should be:
If(Value(ThisItem.'DUEDATE') >Today(), Red, Black)
However, I assume you wanted to say if the due date is lesser than today. If this isnt working, you can try 2 things:
1. Use the Now() function instead. The Now function returns the current date and time as a date/time value.
The Today function returns the current date as a date/time value. The time portion is midnight. Today has the same value throughout a day, from midnight today to midnight tomorrow.
Since your due date is date/time, this might help for a better comparison.
2. If you are only concerned about the date portion, then you can convert your due date to a date only value and then compare it with today. So something like this:
Date(Year(ThisItem.DueDate), Month(ThisItem.DueDate), Day(ThisItem.DueDate))
Also, if your ThisItem.DueDate is text, you shouldnt be using Value function. You probably need to use DateTimeValue function to convert that text or string into a date time value.
---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!
Hardit(Haman)