Hi every one,
I have a form Test having 3 fields
Start Date - data type Date
End Date - datatype Date
TotalDifference - String
Example:
Startdate - 1/08/2012
EndDate - 15/08/2012
Totaldifference - 15
I need the total days between startdate and Enddate in TotalDifference field.
hi kola,
use this code;
date startDate;
date enddate;
int days;
str totalDifference;
;
days = endDate - startDate;
totalDifference = int2str(days);
static void enddatestarttotaldays(Args _args)
{
date startDate;
date enddate;
int days;
str totalDifference;
;
startDate = 12\10\2012;
enddate = 13\12\2012;
days = endDate - startDate;
totalDifference = int2str(days);
print totalDifference;
pause;
}