I have a field "APTDT" in my database that was set up as a string and the return is 20041122.
I have the following Function to turn it into a date so I can use the "in the period of" acctg options in Crystal.
Function (numberVar v2)
local stringvar str;
str:=totext(v2,0,"");
local stringvar dd:=right(str,2);
local stringvar mm:=mid(str,5,2);
local stringvar yy:=left(str,4);
date(tonumber(yy),tonumber(mm),tonumber(dd));
Whenever I try to run the report I get the following error:
The string is non numeric.
date(tonumber(yy),tonumber(mm),tonumber(dd));
The middle \tonumber(mm)\ is highlighted, can anyone help.
I have the following Function to turn it into a date so I can use the "in the period of" acctg options in Crystal.
Function (numberVar v2)
local stringvar str;
str:=totext(v2,0,"");
local stringvar dd:=right(str,2);
local stringvar mm:=mid(str,5,2);
local stringvar yy:=left(str,4);
date(tonumber(yy),tonumber(mm),tonumber(dd));
Whenever I try to run the report I get the following error:
The string is non numeric.
date(tonumber(yy),tonumber(mm),tonumber(dd));
The middle \tonumber(mm)\ is highlighted, can anyone help.