Jump to content

Calculate domain name from emailaddress field


This topic is 5697 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Jeff:

Assuming that you're only dealing with valid email addresses (i.e., something in the format '[email protected]'), you can use Position() to find where the '@' is, and then Length() and Right() to extract the data you want. The calculation would go like this, where the text field in question is called 'Email'.

Right(Email,(1+Length(Email)-Position(Email,"@",1;1))

Which evaluates like this, for an email value of '[email protected]':

Right('[email protected]', 1+9-3)

or:

Right('[email protected]',7)

which gives you:

@me.com

To just get the domain itself (without the '@', remove the '1+' in the equation.

-Stanley

Link to comment
Share on other sites

This topic is 5697 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.