Kiosk Studio: Function FIX for Date/Time Field (Keep getting wrong format error)

Kiosk Studio: Function FIX for Date/Time Field (Keep getting wrong format error)

I am using the foillowing function in my Kiosk Studio to update the previously entered Date/Time field from previous screen to update that to the same date/time field in Lead Record. Every time I 'Save & Execute' I get a Success but with 'Date/time Format invalid' error.  What do I need to enter into the date/time field when I Save/Execute to update and save correctly?

  1. // Initialize a map to hold the field data for updating
  2. updateMap = Map();
  3. // Put the auction date/time field into the map
  4. // Make sure to replace 'DateField' with the actual field API name
  5. updateMap.put("Date",Date);
  6. // Update the lead record using the LeadID argument
  7. updateResp = zoho.crm.updateRecord("Leads",LeadID,updateMap);
  8. // Check if the update was successful
  9. if(updateResp.get("status") == "success")
  10. {
  11. info "Lead record updated successfully with auction date/time.";
  12. }
  13. else
  14. {
  15. info "Failed to update lead record: " + updateResp.get("message");
  16. }