Revove decimal if two in field (1 Viewer)

itownson1

Registered User.
Local time
Today, 07:47
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
Staff member
Local time
Today, 07:47
Joined
Oct 29, 2018
Messages
21,358
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, 07:47
Joined
Mar 2, 2010
Messages
791
Edit your query for the field something like:
Code:
NoDec1:iif(left(fieldname,1)=".",mid(fieldname,2),fieldname)
 

itownson1

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

Users who are viewing this thread

Top Bottom