Calculating Time Difference between two Date-Time Stamps on Zoho Creator
Hello,
I am trying to find the time difference between two time-stamps. We cannot use the
timeBetween function on Zoho Creator so I am using the following script to find the number of days and then round off to the nearest higher integer.
Number_of_Days = ceil((Current-End_Date_and_Time)/(1000*3600*24));Now my question is that I want to calculate the number of months between two time-stamps and in order to do that, I am not sure if I can use
((Current-End_Date_and_Time)/(1000*3600*24*30)) since the number of days in a month vary obviously. Is there a way around to this?
Note: I cannot use
monthsBetween function because that only calculates the difference between months. For example if my dates are 01 Aug 2021 and 15 Sep 2021 then this (
monthsBetween) function gives 1 month but I want it to give 1.5 months so that I can round it up to 2 months.
Best Regards,
Maaz Ansari