hello, I need to join 2 integers together as if they were strings.
ie. 10000 + 01 = 1000001
also how would I format it so a 1 would dispay 01? thanks!
Printable View
hello, I need to join 2 integers together as if they were strings.
ie. 10000 + 01 = 1000001
also how would I format it so a 1 would dispay 01? thanks!
I did it with the following but I am sure there is probably a better way
replace(replace(totext({PL_Shipping_Template.PL_Header_Invoice_Number}),".00","") & "-" & totext({PL_Shipping_Template.PL_Header_BO_Number},"00"),",","")
for some reason my invoice_number was adding .00 to the end that is why there are 2 replace calls.
All numbers in Crystal are decimal values. When converting numbers to text, the second argument can also be used to indicate the number of decimal places to include (if you include a format in the second argument - decimal places argument becomes the third argument).
The third (or fourth) argument lets you overide the thousand separator.
This formula returns a number. You can then Format that number using the normal means.
It wasn't clear if you wanted the Formula to return a number or a string. If string add another ToText around the above formula.Code:ToNumber (ToText (PL_Shipping_Template.PL_Header_Invoice_Number, 0,'' ) +
ToText (PL_Shipping_Template.PL_Header_Invoice_Number, "00",0,'')
)
awesome, thanks man!