Saturday, March 31, 2012

Trim all characters after the first " . " help need...

I need a really basic line of code which i can not find. I need to do is remove ALL characters after and inc the characters "." found in a variable. i have a variable which holds device with DNS name such as E096064-FWSM2.netdevice.companyname.com i want the variable to just hold the name E096064-FWSM2 the extension after the first "." can very greatly so i can not specify all possible options as i just do not know what they are going to be.

really hope someone can help me

paul

code below did the job

DNSnode = Left(fullDNSname, InStr(fullDNSname, ".")-1)

0 comments:

Post a Comment