You need to sign in to do that
Don't have an account?
kdmr
Error Invalid Integer while using adddays method
Hi, I have been trying to do a calculation on the date type field when I keep encountering this error
double d = integer.valueof(mfrwdays);
integer i = d.intValue();
enddate = objassetconfig.MfrWarrantyStart__c.adddays(i);
where mfrdays is the value for a inputtext in the vf page. I have also tried to accept integer value directly from the string and still result with the same error. Require some help on this.
Thanks
KD
Hi,
I have a null value check for mfrwdays, if no value is entered it does not perform the enddate calculation. I tried using Interger i = integer.valueof(mfrdays) and was getting the error so tried using the intvalue() function. I am able to get the value for mfrdays in the debug logs but not for the integer or double variables. It is also checked to ensure that only numeric values are entered.
Thanks
KD