Segregation

Hi all

this.Field1= “Hello” + ‘\n’+ date2str(today() ,123, 2, 2, 2, 2, 4) +" “+ time2str(timenow(),1,1) +”:"+ curuserid();

how to seperate the curuserid() alone …how to use in substring the text is given as a manual input it may be any no of characters…pls help

Regard’s

Manjusha.D

Hi Manjusha,

Try this…
static void Segregation(Args _args)
{
str s,s1;
int len,j,k;
;

s = “Hello” + ‘\n’+ date2str(today() ,123, 2, 2, 2, 2, 4) +" “+ time2str(timenow(),1,1) +”:"+ curuserid();
print s;
len = strlen(s);
j = strScan (s,":",len,-len);
for(k = len; k >= 1 ; k–)
{
if(j == k)
{
break;
}
s1 = substr(s,k,k);
len–;
}
print s1;
pause;
}

Naresh Kolli