I want to change this scrip to delugue

I want to change this scrip to delugue

Hi. I want to change the following scrip to delugue
The code does this:
I have an application where entry and exit times are recorded. I want to calculate which hours are daytime and which are nighttime, with nighttime hours being from 9 PM to 6 AM.

For example if I have start time 6pm and end time 10pm wil be 3 hours day time 1 night time

Periods can cross midnight 

Daily hours
Let( [ a = Max(Time(06:00:00); Hora_Inicio); b = Min(Time(21:00:0); If(Hora_Fin < Hora_Inicio; Hora_Fin + 86400; Hora_Fin)); ]; Max(0; b - a) )

Night hours
Let(
[
a = Max(Time(21; 0; 0); Hora de inicio);
b = Min(Time(6; 0; 0)+ 86400; If(Hora de fin < Hora de inicio; Hora de fin + 86400; Hora de fin))
];

Max(0; b - a)

)


    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


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




                          Zoho Writer Writer

                          Get Started. Write Away!

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

                            Zoho CRM コンテンツ




                              ご検討中の方