Date and time

Hi Experts, Hope you are doing good!   I have one blocker, mentioned as below I am using start date/time and End date/time atributes based on which I am calculating duration. and now i want to check if the time exceeds 24 hours then i need to add row related to same record to show amount of time that exceeding 24 hours and also change the date at the same time.   how can i achieve this please advise?   Thanks for all ideas and suggestions!
2 answers

Hi Malay,

you can use the hoursBetween() function, which will help you to get the number of hours between start and end time, and on the base of that, you ccan write your own logic of adding lines.


Let me know, if you hae any issues,

Hope it helps!!



You can take a look at calculating the difference between two dates

or the other way around look at adding or subtracting time to/from a date

But the second part of your question I don't really get. Adding a related record is not difficult, but what date are you trying to change? Be aware that if time elapses the difference between dates becomes larger as well and depending on if you want to display the actual/current difference you might want to look in using a calculated attribute. To be able to execute logic on a regular basis (eg check every hour if the '24 hours' passed for a record and then create/update records) you can use scheduled events.

Hope this helps