Start Date,

Hi Guys.

My requirement is that i have created a form with 2 fields

  1. Entry Date.

  2. Number of days.

now i want to generate the number of dates depending on the value enter in the field 2.

i.e.

Entry Date = ‘05-05-2011’

Number of days = 3

Output:

01-05-2011

01-06-2011

01-07-2011

Hi Kami,

Try this logic…

static void ex_Dates(Args _args)
{
TransDate entryDate;
int noOfDays;
int i;
TransDate d;
;
entryDate = mkDate(06,06,2011);
noOfDays = 3;

for( i = 1; i <= noOfDays; i++)
{
d = entryDate + 1;
entryDate = d;
print d;
}
pause;
}

Naresh Kolli