Hi,
Your expression seems valid, and should work. Did you debug the microflow? You can then see the values of the variables – for DateTimes it will display both the UTC and Session time.
Please be aware of the difference between UTC and Session time, which might cause different behaviour than you'd expect at first sight. Also read the documentation on DateTimes https://docs.mendix.com/refguide/date-and-time-handling/