FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. For more details, review the migration guide. Contact support@fauna.com with any questions. |
TimeDiff
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
TimeDiff( start, finish, unit )
time_diff( start, finish, unit )
TimeDiff( start, finish, unit )
TimeDiff( start, finish, unit )
TimeDiff( start, finish, unit )
Description
The TimeDiff
function returns the time difference between start
and finish
, expressed in unit
units. The difference includes start
but excludes finish
.
Parameters
Parameter | Type | Definition and Requirements |
---|---|---|
|
Date or Timestamp |
The starting Date or Timestamp. |
|
Date or Timestamp |
The ending Date or Timestamp. |
|
String |
The type of unit that the difference should be expressed in. When When
|
Examples
The following query demonstrates several time differences:
[ 18449, 36899, 442788, 26567314, 1594038896, 1594038896789 ]
[18449, 36899, 442788, 26567314, 1594038896, 1594038896789]
[18449 36899 442788 26567314 1594038896 1594038896789]
Arr(LongV(18449), LongV(36899), LongV(442788), LongV(26567314), LongV(1594038896), LongV(1594038896789))
[ 18449, 36899, 442788, 26567314, 1594038896, 1594038896789 ]
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!