Return to v2.3 docs


Global Helpers Date Functions string controller model migrator migration tabledefinition

Returns a string describing the approximate time difference between the current date and the date passed in.

Name Type Required Default Description
toTime date Yes Date to compare to.
includeSeconds boolean No false Whether or not to include the number of seconds in the returned string.
fromTime date No [runtime expression] Date to compare from.
// Controller code.
aLittleAhead = DateAdd("d", 365, Now());

// View code.
<!--- Will output: about 1 year --->

Related Functions

Date Functions