Hi there,
I have an age field in a table that has ages formatted like so:
64y
101y
13y 3m
6m 12d
I wish to make a query so that only the year number is left in the field.
So basically take everything before the 'y', unless there is no 'y', in which case put '0'
Heres how I do it currently in excel:
=VALUE(LEFT(H6,FIND("y",H6)-1))
Any help much appreciated.
Tom.
EDIT
I take it that the 'Iif' function can sort the ages that don't have a 'y', its just the other part I need because FIND apparently doesn't exist in Access.
I have an age field in a table that has ages formatted like so:
64y
101y
13y 3m
6m 12d
I wish to make a query so that only the year number is left in the field.
So basically take everything before the 'y', unless there is no 'y', in which case put '0'
Heres how I do it currently in excel:
=VALUE(LEFT(H6,FIND("y",H6)-1))
Any help much appreciated.
Tom.
EDIT
I take it that the 'Iif' function can sort the ages that don't have a 'y', its just the other part I need because FIND apparently doesn't exist in Access.