Revove decimal if two in field (1 Viewer)

itownson1

Registered User.
Local time
Today, 08:40
Joined
Mar 20, 2019
Messages
43
I am trying to remove a decimal if it is the first character in a field.
We get weights from a set of scales that appear as .2.450 which is 2.45kg.
When manually entered there is no leading decimal so trim is not an option.
Ian
 

theDBguy

I’m here to help
Local time
Today, 08:40
Joined
Oct 29, 2018
Messages
10,678
Hi Ian. Have you tried using Left() to check for a dot? Or, you could also try InStr(). However, both functions require a String value.
 

sxschech

Registered User.
Local time
Today, 08:40
Joined
Mar 2, 2010
Messages
664
Edit your query for the field something like:
Code:
NoDec1:iif(left(fieldname,1)=".",mid(fieldname,2),fieldname)
 

itownson1

Registered User.
Local time
Today, 08:40
Joined
Mar 20, 2019
Messages
43
Once again, thank you very much. Worked perfectly.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom