DateDiff

Overview

Returns the difference between two dates.

Syntax

DateDiff(1, 2, 3)

Function Properties

Ordinal Type Description
1 Date Required Starting date for comparison using either MM/dd/yyyy or YYYY-MM-DD format
2 Date Required Date to subtract from starting date using either MM/dd/yyyy or YYYY-MM-DD format
3 string Required Unit of time of the difference. Valid values include Y, M, D, H, or MI

Usage

%%=DateDiff(@tomorrow,@today, 'D')=%%

System returns: 1

Last Updated: Jun 8, 2021