Otter SDK Reference
Version:

RelativeDate(System.DateTime? referenceFromDate, System.DateTime? toDate) Method

Calculates the relative time from the specified dates

Syntax

public static string RelativeDate(System.DateTime? referenceFromDate, System.DateTime? toDate)

Parameters

referenceFromDate
Type: System.DateTime?

The reference System.DateTime used to calculate relative time. Typically, this is System.DateTime.Now.

toDate
Type: System.DateTime?

The System.DateTime with which the reference value will be compared.

Returns

System.String containing relative time if dates are valid, otherwise an empty string.