UDF's always type "String". It's possible to use it as DateTime Fields, but the system will only format the Input date to regional format defintion.
Other example in itemchanged event
dw_1.item.udf1.value=<dw_1.item.udf1.value,date>
This convert the String to Date field and back to String with regional format
if you want to check this with another Date, you can convert this to number:
format: yyyymmdd 2021/10/05 = "20211005".
Now you can check this
if <dw_1.item.udf1.value,yyyymmdd> n< <today,yyyymmdd> then
messagebox=Date must be in future
return -1
end if
The operator "n<" (or n>, n=, n>=, n<=) convert both sides to Number and in this way you can create your logic function.