Try
var1=123456
var2=substr(alltrim(str(var1)),1,3)
HTH
Agnes
>Dear Sir,
>
>var1=123456
>var2=?
>
>In var2, I want to get last three digits from var1 as string but the command must be in only one line.
>
>I have checked following codes but failed
>
>
>var1=123456
>var2=alltrim(str(substr(var1,1,3)))
>
>
>How is it possible?
>
>Please help
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]