Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Stripping an Email Post Reply Post New Topic
Author Message
Dejaneira
Newbie
Newbie


Joined: 11 Sep 2015
Location: United States
Online Status: Offline
Posts: 15
Quote Dejaneira Replybullet Topic: Stripping an Email
    Posted: 16 Jun 2022 at 5:41am
Is there a way to write a formula that can strip '@company.xxx'? I want to delete the @ and everything after but the emails are not consistent. Is this possible?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 16 Jun 2022 at 5:52am
you want something like:
left({table.field}, instr({table.field}, "@") - 1)

I don't have Crystal right now, so I might have the wrong command for instr.

What the above is trying to do is to take everything from the left of the email as judged from where @ character is. Subtract 1 to remove the @ character. This will leave everything to left of the @ regardless of where the @ is in the email.

HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.