Home Search

DriveWorks Pro 22
SppDateTimeSpan

Send Feedback

SppDateTimeSpan

This is now an inbuilt function, please see DateTimeSpan for more information.

Returns a table of information representing the time interval between two Date Time values.

Syntax

SppDateTimeSpan([DateTime1],[DateTime2],[Culture Name])

Where:

DateTime1 is the earliest DateTime.

DateTime2 is the latest DateTime.

Culture Name (optional) is the name of the culture to use in the format languageCode-regionCode. for example en-us.

If Culture Name is omitted the Date Time format should be given in the current culture format of the machine in use.

Example

RuleResultMeaning
SppDateTimeSpan("09/16/2017 11:30:21","03/29/2019 11:30:04"){"Days","Hours","Minutes","Seconds","Milliseconds","TotalDays","TotalHours", "TotalMinutes","TotalSeconds","TotalMilliseconds"; 558,23,59,43,624,558.99,13415.99,804959.72,48297583.62,48297583624.68}This is the Array that will be created with information representing the time interval between two Date Time values.
SppDateTimeSpan(DWVariableThen,DWVariableNow){"Days","Hours","Minutes","Seconds","Milliseconds","TotalDays","TotalHours", "TotalMinutes","TotalSeconds","TotalMilliseconds"; 558,23,59,43,624,558.99,13415.99,804959.72,48297583.62,48297583624.68}This is the Array that will be created with information representing the time interval between two Date Time values.
SppDateTimeSpan("09/16/2017 11:30:21","03/29/2019 11:30:04","en-us"){"Days","Hours","Minutes","Seconds","Milliseconds","TotalDays","TotalHours", "TotalMinutes","TotalSeconds","TotalMilliseconds"; 558,23,59,43,624,558.99,13415.99,804959.72,48297583.62,48297583624.68}This is the Array that will be created with information representing the time interval between two Date Time values.
Including the Culture Name will ensure the dates are parsed as US date times, regardless of the culture of the machine it is being run on.
SppDateTimeSpan(NowUtc(),Now(),"en-us"){"Days","Hours","Minutes","Seconds","Milliseconds","TotalDays","TotalHours", "TotalMinutes","TotalSeconds","TotalMilliseconds"; 558,23,59,43,624,558.99,13415.99,804959.72,48297583.62,48297583624.68}This is the Array that will be created with information representing the time interval between two Date Time values.
Including the Culture Name will ensure the dates are parsed as US date times, regardless of the culture of the machine it is being run on.