Convert String to Date

Convert String to Date

Hi There,

I am trying to convert a string to a date with MM/dd/yyyy formatting but I cannot get it to work. 

The field Departure_Date_Website holds the value of: Sep 09, 2024

  1. resp = zoho.crm.getRecordById("Leads", recordid);
  2. stringdate = resp.get("Departure_Date_Website");
  3. departuredate = stringdate.toDate("MM/dd/yyyy");
  4. mp = map();
  5. mp.put("Departure_Date" : "departuredate");
  6. update = zoho.crm.updateRecord("Leads", recordid, mp);