Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NSC | Formula to Calculate Total Time in Minutes
Scenario
There are Time of Day type custom fields for "Time Started" and "Time Finished".
User wants to automatically calculate the total time (in minutes) between these two fields and show it in another custom field "Time Spent".
For example:
- Time Started = 1:00 pm
- Time Finished = 2:30pm
The Time Spent field should show 90.
Solution
This formula can be used to calculate the total time in minutes:
((CASE WHEN (FLOOR(({fieldforendtime}-{fieldforstarttime})*24)) < 0 THEN FLOOR(({fieldforendtime}-{fieldforstarttime})*24)+24 ELSE (FLOOR(({fieldforendtime}-{fieldforstarttime})*24)) END)*60) + (CASE WHEN MOD((({fieldforendtime}-{fieldforstarttime})*1440), 60) < 0 THEN MOD((({fieldforendtime}-{fieldforstarttime})*1440), 60)+60 ELSE MOD((({fieldforendtime}-{fieldforstarttime})*1440), 60) END)
Just change the {fieldforendtime} and {fieldforstarttime} to the field IDs of the fields in your account.
Learn how to Refer A Member | Earn the Answer Accepter Badge | Be the Content Creator of the Quarter | Vote for the content you want to see!
