The "=" is not the equality operator in FormCalc or JavaScirpt, it is the set operator. You have to use "==" or "eq"
You also might want to convert the date time raw value character strings to the number of days from the Epoch date for LiveCycle Designer before doing a comparison. This would convert all dates to a known data type and would be in a common denominator.
Thanks for pointing out that equality operator. I found out that later on. I am really new to the Designer & I would apperciate if you can tell me how to convert the Date time raw value character strings to the number of days from Epoch date.
xfa.host.messageBox(Concat(msg, "Difference in days: ", Diff), "Difference in Days", 1)
When you fill in both dates and exit the needed field you will get a pop-up showing the results.
Note: it is best to set the "Display Pattern" and use the same pattern for the "format" parameter in the Date2Num funciton as this is a value that you can control and know will be correct for the conversion.