Hi all
I need to trim a column which has a number from 11 digits to 10 digits .
I tried converting it to string first using the "Tostring" function . (I created a new column to do this )
Post that the "Metadata" showed the type to be V_String .
The new column I created above which did show the format to be V_string , I used that for the trim function but it gave me an error
Parse error at char (0) : Type mismatch. Number provided where a string is required .
otherwise is there some way to trim a number ?
can you please suggest what should I do ?
thanks
Solved! Go to Solution.
Hi @simran_dua ,
You can use the formula tool to trim left or right as example attached.
Take a look and let me know if that works for you.
Best,
Fernando Vizcaino
@simran_dua you can use a select tool to convert the number to a string or Vstring. Then in the formula tool, you can use left([field],10) or right([field],10) to get the left or right left numbers, respectively.
Does that help?
Hi @simran_dua ,
The only thing you are missing are the quotes in the 2nd parameter.
trim([Filed name],'5')
But you need to use trimleft or trimright to remove character from the sides. Trim function as you wrote will remove the number 5 from the edges of your number. For example, the number 515 = 1, 15 = 1
Best,
Fernando Vizcaino
thank you so much .
how can trim DateToday() to display only year and have this in Date format?