iif and Partial Decimal (1 Viewer)

PNEfinney

New member
Local time
Today, 09:19
Joined
Oct 3, 2019
Messages
15
Hi all,

should be a quick one, but its being a bit of a pain.

I have a field that is number format showing a duration. There are some in this field that contain decimals, which are always halves, ie. .5 but the whole number can be anything (I have 14.5, 7.5, 20.5 etc.)

using this iif I can classify the 0.5's:

Partial Days: IIf([Duration_Days]=.5,"Partial Days, cha!","")

But i cant seem to find a wildcard that works. # just gives me an error.

Anyone with any tips?
 

arnelgp

error reading drive A:
Local time
Today, 17:19
Joined
May 7, 2009
Messages
10,844
Partial Days: IIf(([Duration_Days] - Int([Duration Days]) > 0,"Partial Days, cha!","")

Partial Days: IIf(Instr(CStr([Duration_Days]), ".5")>0, "Partial Days, cha!","")
 

PNEfinney

New member
Local time
Today, 09:19
Joined
Oct 3, 2019
Messages
15
Partial Days: IIf(([Duration_Days] - Int([Duration Days]) > 0,"Partial Days, cha!","")

Partial Days: IIf(Instr(CStr([Duration_Days]), ".5")>0, "Partial Days, cha!","")
They both work beautifully, thank you.

I just have to go and backwards engineer what the query is so i can use it again.
 

Users who are viewing this thread

Top Bottom