$datediff(date1,date2)
The $datediff function returns the difference, in days, between date1 and date2. Both dates must be in the standard internal format yyyymmdd: 4-digit year, 2-digit month, 2-digit day of the month.
Roughly speaking, this function returns date1 - date2, although the actual calculation involves more than a subtraction because of the date format. The result is negative if date1 < date2 (i.e., earlier) and positive if date1 > date2 (i.e., later).
Windows Installer does not support symbolic functions; if you use this function
during an MSI build, you will get diagnostic message BLD:U0010
and the result is undefined.
All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.
Here are some usage examples for this function:
Returns the number of days (positive) between the date the installer was built and the current installation.
Note: BuildDate and InstallDate are standard variables. However, BuildDate is not saved in the installer's database by default, so you must set its Save for Tarma attribute to use it in the installer.