How can we pass the zoho.currenttime form Zoho CRM to Creator date time field

How can we pass the zoho.currenttime form Zoho CRM to Creator date time field

I am trying to pass from a CRM custom function the zoho.currenttime (or the date) to a Zoho Creator date/time field.
I have written multiple ways but I always get "Please Enter a valid date/time for the field"

I have written ways like for example

  1. EndDateTime = zoho.currenttime;
    mpData.put("Work_End_Date_Time",GetEndDateTime)
or something like

  1. EndDateTime = zoho.currenttime;
     
  2. GetEndDateTime = EndDateTime.toTime("yyyy-MM-dd'T'HH:mm:ss").addMinutes(0).toString("dd-MMM-yyyy HH:mm:ss").addMinutes(0).toString("dd-MMM-yyyy HH:mm:ss");
  3. mpData.put("Work_End_Date_Time",GetEndDateTime)
but again I have the same error.

Does anyone know how can we write it correctly?
If we can do it with today or zoho.currentdate function I am also fine. Just I want to know how can I pass it to the Creator date/time field

    Access your files securely from anywhere

        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 Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • 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