Date-Time Error on record update,

Date-Time Error on record update,

Hello

I have this simple loop script to update a date-time field with a date/time specified. I have the variable being passed in as a DateTime, but im receiving and error that the timechange variable needs to be datetime? It already is?

Can you look and see why this is erroring out?

//Define  the query to locate all the records that match a zip code.
query = "Zip_Code:equals:75056";

//Create the list
col_leads = zoho.crm.searchRecords("Leads", query);

//Date-Time for the record update.
timechange = '11/04/2018 12:00:00';
info timechange;

for each index val in col_leads
{
leadid = col_leads.get(val).getJSON("id");
result = zoho.crm.update("Leads",ToLong(leadid),{"Record_Refreshed":timechange});
info result;
}

    Zoho Developer Community






                              Zoho Desk Resources

                              • Desk Community Learning Series


                              • Digest


                              • Functions


                              • Meetups


                              • Kbase


                              • Resources


                              • Glossary


                              • Desk Marketplace


                              • MVP Corner


                              • Word of the Day



                                  Zoho Marketing Automation


                                          Manage your brands on social media



                                                Zoho TeamInbox Resources

                                                  Zoho DataPrep Resources



                                                    Zoho CRM Plus Resources

                                                      Zoho Books Resources


                                                        Zoho Subscriptions Resources

                                                          Zoho Projects Resources


                                                            Zoho Sprints Resources


                                                              Qntrl Resources


                                                                Zoho Creator Resources


                                                                  Zoho WorkDrive Resources



                                                                    Zoho Campaigns Resources

                                                                      Zoho CRM Resources

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series


                                                                      • Tips

                                                                        Tips

                                                                      • Functions

                                                                        Functions

                                                                      • Meetups

                                                                        Meetups

                                                                      • Kbase

                                                                        Kbase

                                                                      • Resources

                                                                        Resources

                                                                      • Digest

                                                                        Digest

                                                                      • CRM Marketplace

                                                                        CRM Marketplace

                                                                      • MVP Corner

                                                                        MVP Corner

                                                                      





                                                                      




                                                                          Design. Discuss. Deliver.

                                                                          Create visually engaging stories with Zoho Show.

                                                                          Get Started Now