show / hide menu

DateDiff

This function can be used to compute the date difference. This function requires two arguments, the first one is the from date value and the next one is the end date. This function returns the number of days between the two given dates.

Syntax :

DateDiff(Date From, Date To)

Where
Date From is the Start date
Date To is the End Date

Examples :

textbox1.Value = DateDiff( dtFromDate.Value , dtFromTo.Value )

This example shows how we can use a date from two datetimepicker controls and find the difference of days between them.