View Full Version : Filter IP Addresses


lucour
09-13-2005, 05:18 AM
Hi,

I have a field in one of my tables that contains IP Addresses. These addresses can look something like 142.67.214.73/24 or 192.168.196.0. I would like create a calculated field so that ALL IP addresses just show the first 3 octet's. So the first one would just show 142.67.214 and the second one just 192.168.196

Any help would be great .......

Thanks !

Jon K
09-13-2005, 06:33 AM
IP: Left([IP Address],InStr(InStr(InStr([IP Address],".")+1,[IP Address],".")+1,[IP Address],".")-1)
.

lucour
09-13-2005, 12:13 PM
Jon K ........ Thank you so much !! I tried this, and it was exactly what I was looking for. Cheers !!