|
|
|
|
|
DateDifference (Function) In french: DateDifference Calculates the number of days between two dates.
nbDays is int
nbDays = DateDifference("19980101", Today())
Info(nbDays + " days elapsed")
Syntax
<Result> = DateDifference(<Start date> , <End date>)
<Result>: Integer Number of days elapsed between two dates. This number of days is the result of the following operation:
<End date> - <Start date> The number of days is negative if <Start date> is after <End date>. <Start date>: Character string or Date variable Start date for the calculation in YYYYMMDD format (YYYY corresponds to the year, MM to the month and DD to the day). <End date>: Character string or Date variable End date for the calculation in YYYYMMDD format (YYYY corresponds to the year, MM to the month and DD to the day). Remarks The validity of the dates passed as parameters is checked. A message is displayed if the date is invalid. You can check the validity of a date using DateValid. This function cannot be used to calculate the difference between two dates before October 14, 1582 (the change from the Julian to the Gregorian calendar will not be taken into account). The date storage format allows you to store dates from 01/01/0001 to 12/31/9999.
Related Examples:
|
Unit examples (WINDEV): Management of dates
[ + ] Using the Date type of WLanguage and the functions for handling dates.
|
Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|