Hi, I have a question,how to set field value which data type is dateformula in program code? for example: item.leadtime:=‘1M’; the field leadtime datatype is dateformula,but ‘1M’ is text/code so the program line is not right,the C/AL will not convert the data type.
Hi You can use the Eavluate command EVALUATE(item.leadtime,‘1M’); Steve
Hi … Maybe it does not matter in your case, but I had problems using similar code when users were using different languages. To prevent that use: EVALUATE(item.leadtime,’<1M>’); This will ensure that 1M will be understood on all clients, no matter what the language. Gulli