HotDocs Author WorkflowCreate a template Add placeholders Group variables in dialogs Upload a template Create a script

DAYS FROM Function

The DAYS FROM function returns the number of days between two dates.

Function name DAYS FROM
Usage model DAYS FROM ( start:DATE, finish:DATE )
Parameters This function requires you to replace two parameters:

start: DATE

The function determines the number of days between this date and the finishing date.

finish: DATE

The function determines the number of days between this date and the starting date.
Result A number value.

Example

A buyer has 60 days to make a payment on an account balance. If the buyer has missed the payment deadline, the assembled document should indicate the past due status. The following computation script uses the DAYS FROM and TODAY functions, along with IF and ELSE instructions, to indicate whether or not the account is past due:

IF DAYS FROM( PurchaseDate, TODAY ) > 60
   "Your account is past due."
ELSE
   "Your account is current. Thank you."
END IF