Having worked with Navision now for almost 7 months, I have seen many posts about converting string to date converting code to integer and almost nothing about putting a date into a string, I have not had to do this until now, and when I went to look for help I did find alot of people demanding that everyone run to the C/SIDE help and look at EVALUATE. I am trying to use EVALUATE to turn a date into text, but apparently I am not doing it right, and trying to understand how to use it is VERY frustrating using the C/SIDE help Basically here is my code: OK := EVALUATE(“End Date”,txtDate) This code passes compilation then I have xvar.Label := txtDate This code passes, but when I run the form, txtDate is BLANK Please help!!!
Hi Devin, It’s actually a lot more straightforward this way round. You only need EVALUATE when trying to insert code or text into integer, boolean, date etc. For what you are doing (any of those into text or code), you just need FORMAT: txtDate := FORMAT(“End Date”); What you are actually doing in your code is assigning the blank value of txtDate into the “End Date” field. I agree about the C/SIDE help, by the way.
Evaluate funstion works on converting string to other datatypes.
Thanks for the response, I had a real brainfade and found later that CONVERT was working. I was trying to throw parameters at the CONVERT function that weren’t necessary