Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9843

Working With Durations In Google Apps Script

$
0
0

I'm trying to write a function in Google Apps Script to manipulate durations calculated in Google Sheets. The cells holding the durations look like:

18:40:00
26:42:01

When I pass a duration into my code it appears to come in as a date object. So I've been using Date.getHours() et al to pull out the components of the time. But when the hours exceeds 23, it comes out mod 24.

Where did the "days" part of the duration go? Is there a method I can call on the Date object to get it?


Viewing all articles
Browse latest Browse all 9843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>