I have a form field with a date in it formatted mm/dd/yy.
The field is named LaunchDate, so the below code shows "7 - 9 - 07" for 05/07/01, "6 - 9 - 06" for 05/06/01, but shows "0 - 9 - 09" for 05/09/01! (also for 05/08/01)...
For some reason, 08 and 09 are evaluating to 0!?
It seems that only these two dates do this so I'm wondering if parseInt is at fault ...
note: #Day(now())# is a coldfusion function that yields the 9 in the above examples (today is the 9th)
alert(parseInt(ThisForm.LaunchDate.value.substring(3,5))+" - #Day(now())# - "+ThisForm.LaunchDate.value.substring(3,5));
Any light shed would be greatly appreciated,
- Marc
The field is named LaunchDate, so the below code shows "7 - 9 - 07" for 05/07/01, "6 - 9 - 06" for 05/06/01, but shows "0 - 9 - 09" for 05/09/01! (also for 05/08/01)...
For some reason, 08 and 09 are evaluating to 0!?
It seems that only these two dates do this so I'm wondering if parseInt is at fault ...
note: #Day(now())# is a coldfusion function that yields the 9 in the above examples (today is the 9th)
alert(parseInt(ThisForm.LaunchDate.value.substring(3,5))+" - #Day(now())# - "+ThisForm.LaunchDate.value.substring(3,5));
Any light shed would be greatly appreciated,
- Marc