Type mismatch error on date/timestamp - UIX

Hi,

I'm getting a type mismatch error on my UIX app.

Here is my code

var createDateStartCondition = new MFiles.SearchCondition();
createDateStartCondition.Expression.DataPropertyValuePropertyDef = MFBuiltInPropertyDefCreated;
createDateStartCondition.ConditionType = MFConditionTypeGreaterThanOrEqual;
createDateStartCondition.TypedValue.SetValue(MFDatatypeDate, new Date(2024, 0, 1)); // Line throwing error
objectSearch.Add(-1, createDateStartCondition);

I also tried using MFDatatypeTimestamp but still the same error.

Hope you can help.

Thanks,