I want to calculate difference between two date and time. I need to calculate duration between two like 1 day 6 hours or only 8 hours.
I did a demo a little while back that included a calculation for displaying this result in zulu duration format. Getting the difference between to times is easy enough, but gets complicated when displaying in different time measures (days, hours, minutes, etc...)
You can download an unlocked demo here: GitHub - SoliantMike/FM-ZuluTime: Formatting Zulu Time and Durations in FileMaker
If you're willing to consider creating a small micro-service, this calculation is literally a simple one-liner using standard date API functions.
Using these two dates and times:
1 day, 0.25 hours.
The micro-service could just return these two values (1, 0.25) in a RETURN-DELIMITED list for easy FMP consumption.
The beauty of a micro-service is that it works anywhere, with any operating system, on any computer, at any location, with virtually unlimited users. All for free. FileMaker or no FileMaker....a micro-service is totally independent so you can use it with any HTTP-enabled application (an application that can issue HTTP verbs like GET, POST, etc. Terminal, Browser? No problem.). What's not to love?! You Control The Code! (not some third party).
Check out my two micro-service tutorials in the App Innovations Area:
Create Micro-Services Using Java and the Spark Java Framework
The Simplest Micro-Service! (Python and Flask)
Retrieving data ...