Hi Peter,
Kindly Have look, Hope it will be helpful for you.
Hi Peter,
I would recommend you to go through the Mendix documentation for date time Fucntions :
https://docs.mendix.com/refguide/parse-and-format-date-function-calls
Secondly if i am doing this task I would prefer having two atributes one for User Interaction which is a Date time Attribute and Secondly String attribute for passing to JSON.
When ever the user is changing the value put a onchange flow or do a chnage object in the save microflow and do the Date time cacluclation and set it to string attribute using date Time Functionions like FormatDateTime( Date→ String).
For your second case you can follow the same two attribute FirstInstallmentDueDate- DateTime Attribute and FirstInstallmentDueDateSTR – String. So that you can keep the Default value of CurrentDate time for the DateTime Attribute which suffice for your second use case.
Accept my answer if it helps your use case. ATB!!