Calculate Duration between two Dates in Make.com (formerly Integromat) 2023

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

ความคิดเห็น • 19

  • @TechflowAI
    @TechflowAI  3 ปีที่แล้ว +1

    Do you have any questions about working with times or timezones in Integromat?
    Put them in the comments below 👇

  • @andreossantos
    @andreossantos 2 ปีที่แล้ว +1

    Hey Manuel, this video helped me a lot! Thank you so much for sharing your knowledge.

    • @TechflowAI
      @TechflowAI  2 ปีที่แล้ว

      You're most welcome! Glad it was helpful for you. :)

  • @danieldahan8545
    @danieldahan8545 2 ปีที่แล้ว +1

    greatttttttt
    thanks a lot man

    • @TechflowAI
      @TechflowAI  2 ปีที่แล้ว

      You're most welcome! 😊

  • @roshanrai4597
    @roshanrai4597 2 ปีที่แล้ว +1

    Hey, Your videos are amazing and really helpful. I have a Make question for you which I am struggling to get answers for. I want to calculate duration between two Times instead of date for instance Quoted Time is: 01:00 hrs and the Actual time is 01:45 meaning it took more than 45 minutes to finish than the quoted time. So I want to subtract actual time with quoted time (01:00hrs - 01:45) so on the new field it would update -00:45.

    • @TechflowAI
      @TechflowAI  2 ปีที่แล้ว +1

      You can use th-cam.com/video/1hWG3jcTpk0/w-d-xo.html this part of the video.
      "Hours Minutes and Seconds" as a difference.
      For the Dates, simply use your time 01:00 and parse it like parseDate(01:00;HH:mm).
      It should output what you're looking for.
      Alternatively you can also use split() to get the hours and minutes separately.
      e.g. get(split(01:00;:);1) to get out 01. Then wrap it in parseNumber() to get 1. Then multiply it by 60 to get your hours in minutes.
      parseNumber(get(split(01:00;:);1))*60 = 60 Minutes
      parseNumber(get(split(01:00;:);2)) = 0 Minutes
      Sum 1 = 60 Minutes
      (Sum both up to get the total duration in minutes.)
      Then do the same for your second time:
      parseNumber(get(split(01:45;:);1))*60 = 60 Minutes
      parseNumber(get(split(01:45;:);2)) = 45 Minutes
      Sum 2 = 105 Minutes
      Sum 1 - Sum 2 = 60 Minutes - 105 Minutes = - 45 Minutes
      Now get that back into the HH:mm format I'm showing in the video by using floor + modulus.
      Hope it helps!

    • @roshanrai4597
      @roshanrai4597 2 ปีที่แล้ว +1

      @@TechflowAI Thank you so much Techflow AI, got my self what I needed now

    • @TechflowAI
      @TechflowAI  2 ปีที่แล้ว

      @@roshanrai4597 you're most welcome! :)
      Glad I could help.
      Cheers, Manuel

  • @FahadSheji
    @FahadSheji ปีที่แล้ว

    Amazing, thanks mate

    • @TechflowAI
      @TechflowAI  ปีที่แล้ว +1

      You're most welcome! ☺️

    • @FahadSheji
      @FahadSheji ปีที่แล้ว

      Hi Manuel, I came across your story and found it fascinating how similar our journeys have been. Starting with chatbots and now creating complex automation for businesses, saving them countless hours, is truly rewarding work. I also have a passion for teaching marketing automation and currently lecture at an academy.
      I believe we could have a lot to share with each other in terms of experiences and thoughts in this field. It would be great to connect and have a conversation about how we have helped our clients with automation.
      Would you be available for a call sometime soon to discuss this further? I look forward to hearing from you.

  • @alexandermartin765
    @alexandermartin765 2 ปีที่แล้ว +1

    Hey, You have a great set of videos going on here! I have a integromat question for you. Would you happen to know of a way to check the number of months between two dates and if they are divisible by x number of months?

    • @TechflowAI
      @TechflowAI  2 ปีที่แล้ว

      Thank you very much! :)
      Yes, that works.
      You'd have to calculate the difference of the years, then the difference of the months, sum up the difference of the years*12 + difference of the months to get your total amount of months between the two dates.
      Then you can use the mod function to check if it's divisible by x number of months.
      If the output of the mod function is 0, there is no rest which means it's divisible by that amount of months.
      Does that help?

  • @loeihard7483
    @loeihard7483 3 ปีที่แล้ว +1

    Hi! I'm looking to convert seconds to the HH:mm format. Is there a way to make this work in integromat? The function you show gives the seconds without the 0 prefix for numbers lower than 10. So converting it to a xx:xx format would end up being 305 seconds > 5:5 instead of 5:05.
    Thanks!

    • @TechflowAI
      @TechflowAI  3 ปีที่แล้ว

      You can just use mm:ss If you want to get the seconds with leading 0.
      Or only for the seconds: formatDate(... ;ss)
      Does that help?

  • @diegoridz
    @diegoridz 2 ปีที่แล้ว +1

    Hey, Manuel! New suscriber.
    Just wondering, what if I want to calculate time difference in months and years?
    I ask cuz even when according to google 1 month has 2628000 seconds, we all know months have different amount of days,
    And speaking about different amount of days, leap-years shares this attribute.
    Any suggestions, Bro?
    Im planning to build an app where according to age users may have access or not, that's why being able to calculate adulthood is so relevant.
    Great Content, by the way!!!

    • @TechflowAI
      @TechflowAI  2 ปีที่แล้ว

      Thank you for your feedback! :)
      Yes, this is a bit more complex.
      You'd have to split up the birthdate (input) into Day, Month and Year and then compare it to Day, Month and Year of {{now}}.
      That way you can calculate the exact age, no matter if it's a leap-year.
      The base:
      Year = formatDate({{now}};YYYY) - formatDate(Birthdate;YYYY)
      Then check if today's month is before the birth month, >> subtract 1 from your age.
      If today's month is equal to the birth month, check the day and subtract 1 from your age if the day is before the day of birth.
      If today's month is bigger than the birth month, keep the age from your "base" calculation.
      Hope it helps!

    • @diegoridz
      @diegoridz 2 ปีที่แล้ว

      @@TechflowAI Got it! Thanks.
      Gonna play around with some conditionals and IF´s in order to get around the month coincidence.
      Thanks again. Found your channel quite useful so thanks also for your content.