How do I create a custom function to have the day in the field "From" generate in a custom field called "MeetingDate" when another field is updated

How do I create a custom function to have the day in the field "From" generate in a custom field called "MeetingDate" when another field is updated

This is what I've tried.

Contactid1=input.Contactid.toString();
resp = zoho.crm.searchrecordsbypdc("Events","Who Id","Contactid");
info resp;
From = YYYY-MM-DD;
for each rec in resp
{
SA_Appointment_Verified = rec.get("SA_Appointment_Verified").todate(<string>);
if (SA_Appointment_Verified.contains("verified"))
{
DiscoMeetingDate = (rec.get("From").todate(to(<string>));
}
}
updateResp = zoho.crm.updateRecord(("Contacts"),Contactid1,{ input.DiscoMeetingDate : From });

Please note that I am not a developer.