Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Convert to Date & Error Check Post Reply Post New Topic
Author Message
AlyssInABubble
Newbie
Newbie
Avatar

Joined: 12 Sep 2012
Online Status: Offline
Posts: 2
Quote AlyssInABubble Replybullet Topic: Convert to Date & Error Check
    Posted: 12 Sep 2012 at 8:28am
I have a text field that I would like to convert to a date to provide consistent formatting as a sort field. I know how to convert the text to a date format; however, when doing so the expression sometimes results in an error (when the text being converted isn't actually a date).

What is Crystal Reports version of "iserror"? I would like to have it check to see if the expression will result in an error, and if so return "true" or "false" or even, to save me a step, a default value. Any suggestions?


Edited by AlyssInABubble - 12 Sep 2012 at 8:32am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 12 Sep 2012 at 11:52am
I would think that you check each part the conversion to see if it is numeric and within range. There is also an IsDate function that you could try.
 
HTH
IP IP Logged
AlyssInABubble
Newbie
Newbie
Avatar

Joined: 12 Sep 2012
Online Status: Offline
Posts: 2
Quote AlyssInABubble Replybullet Posted: 12 Sep 2012 at 11:57am
IsDate works great! Thank you!
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.