Discussions
In NetSuite Analytics, is it possible to calculate minutes or hours between two date/time fields?
In a NetSuite Analytics Dataset, I'm trying to create a calculated field to display the time in minutes between two date/time fields. Nothing I've tried has worked. Is it really not possible to do this?
Here are the formulas I've tried. Some were pretty desparate attempts:
({enddatetime} - {startdatetime}) * 24 * 60
****
((CAST({enddatetime} AS DATETIME) - CAST({startdatetime} AS DATETIME)) * 24 * 60)
****
FLOOR(
TIMESTAMPDIFF(MINUTE, {startdatetime}, {enddatetime})
)
****
(UNIX_TIMESTAMP({enddatetime}) - UNIX_TIMESTAMP({startdatetime})) / 60
****
(CAST({enddatetime} AS TIMESTAMP) - CAST({startdatetime} AS TIMESTAMP)) / 60000
****
(({enddatetime} - {startdatetime}) * 24 * 60)
****
((TO_TIMESTAMP({enddatetime}) - TO_TIMESTAMP({startdatetime})) * 24 * 60)
****
(EXTRACT(EPOCH FROM ({enddatetime} - {startdatetime}))) / 60
****
DATEDIFF(MINUTE, {startdatetime}, {enddatetime})