setting date-time field from string

setting date-time field from string

hello everyone, i hope someone could help me.

i have a date-time field in a form that i want to fill in from two separate fields of date, and time.
i need to combine the two fields to a one date-time field but can make it work. 
i tried to convert the values to string using toString("dd/MMM/yyyy") & toString("HH:mm:ss") and set the date-time field with the two variables by adding them together like this:
input.Date_Time = (date_str + " " + time_str).toDateTime("dd/MMM/yyyy HH:mm:ss");

i would appreciate any ideas of why it doesn't work for me or how to make it work in different ways.

thank you for the help!

      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive 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




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ






                                ご検討中の方