Hi everyone,
When I try to add a number of month to a StartDate ( to get the EndDate) I have some strange result. Following is the code:
<TD WIDTH=300><CFINPUT TYPE="text" NAME="StartDate" VALUE="#Trim(StartDate)#" SIZE=25 VALIDATE ="eurodate"></TD>
<TD WIDTH=300><CFINPUT TYPE="text" NAME="EndDate" VALUE="#DateFormat(DateAdd('M',Plan,StartDate), "DD/MM/YY"
#" SIZE=25 VALIDATE ="eurodate"></TD>
The StartDate have the format DD/MM/YY
The problem is when I add 12 ( Plan=12) to the month of the startdate like 21/01/00 I get the result is 1/01/21. What it should show is 21/01/01. It looks like somehow the YEAR is missplace !!! I set date is short day type in MS Access for both endday, startday and eurodate in Coldfusion( ver 4)
I don't have this problem at all if the number of month I add is less than 12
Could someone give me a hint to what happen here and how could I go around this problem ?
Thanks in advance.
When I try to add a number of month to a StartDate ( to get the EndDate) I have some strange result. Following is the code:
<TD WIDTH=300><CFINPUT TYPE="text" NAME="StartDate" VALUE="#Trim(StartDate)#" SIZE=25 VALIDATE ="eurodate"></TD>
<TD WIDTH=300><CFINPUT TYPE="text" NAME="EndDate" VALUE="#DateFormat(DateAdd('M',Plan,StartDate), "DD/MM/YY"
The StartDate have the format DD/MM/YY
The problem is when I add 12 ( Plan=12) to the month of the startdate like 21/01/00 I get the result is 1/01/21. What it should show is 21/01/01. It looks like somehow the YEAR is missplace !!! I set date is short day type in MS Access for both endday, startday and eurodate in Coldfusion( ver 4)
I don't have this problem at all if the number of month I add is less than 12
Could someone give me a hint to what happen here and how could I go around this problem ?
Thanks in advance.