Jump to content

trimming numbers with multiple decimals in them


This topic is 3589 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a field called version. Some of the values contain multiple decimals for example

 

10.12.73.10

 

I want to trim them down to only contain 1 decimal so in other words 10.12.73.10 would become 10.12

 

another example would be 7456.342.4728.123 would become 7456.342

 

how do i do that?

 

Thanks again!

 

-Erik

Link to comment
Share on other sites

Try:

Let ( 
dot2 = Position ( Version ; "." ; 1 ; 2 )
;
Case ( dot2 ; Left ( Version ; dot2 - 1 ) ; Version )
)

--

What the heck, let's have another:

 Substitute ( LeftWords ( Substitute ( Version ; "." ; ¶ ) ; 2 ) ; ¶ ; "." )
Edited by comment
  • Like 2
Link to comment
Share on other sites

This, not simpler, is another one:

Left ( version ; Max ( Position ( version & "." ; "." ; 1 ; 1 ) - 1 ; Position ( version & "." ; "." ; 1 ; 2 ) - 1 ) )
Edited by Raybaudi
Link to comment
Share on other sites

This topic is 3589 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.