Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: format text for a date field Post Reply Post New Topic
Author Message
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Topic: format text for a date field
     Posted: 06 May 2013 at 3:31am
The following formula can't be saved because it is expecting a date field instead of "n/a". Is there a way to tell crystal to accept this?

if {ROTPersonnelStatusTableB.Record Type} = "OPTION" then {ROTPersonnelStatusTableB.Expiration Date}
else "n/a"

Thanks,
Steve
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 May 2013 at 4:24am
you cana either convert it all to a text or just use a display formula to display it in a different way. Partially depends on what else you need the results for. Also you can chaneg the way i is displayed by altering the "M/d/yy" portion.
if {ROTPersonnelStatusTableB.Record Type} = "OPTION" then totext({ROTPersonnelStatusTableB.Expiration Date},"M/d/yy")
else "n/a"
IP IP Logged
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