DAYS360 (days difference based on 360-day year)

Top  Previous  Next

 

DAYS360(startdate,enddate)

 

DAYS360

Computes the difference in days, between two given dates.

startdate

A numeric constant or variable containing the beginning date.

enddate

A numeric constant or variable containing the ending date.

 

DAYS360 determines the number of days difference between a beginning date (startdate) and an ending date (enddate), based on a 360-day year (30 day month). Both date parameters MUST contain Clarion standard date values.

 

Return Data Type:     LONG

 

Internal Formulas:

 

DAYS DIFFERENCE = ending date - beginning date

where:

ending date = 360(year) + 30(month) + z

z = 30 if ending date = 31 and beginning date > 29

z = ending date if ending date <> 31 and beginning date < 29

and:

beginning date = 360(year) + 30(month) + z

z = 30 if beginning date = 31

z = beginning date if beginning date <> 31

 

Example:

DaysDifference = DAYS360(StartDate,EndDate)