Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Applying day Format via Formula Post Reply Post New Topic
Author Message
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Topic: Applying day Format via Formula
    Posted: 18 Feb 2014 at 3:41am
I detest "blanks" in any report.  Even if there is no data then I create an "IF" statement to fill something in. 

That being said....

I have in my report a date/time field.  If it is blank I want it to input some text.  so my formula reads

If
isnull({table.datefield})
then
"See Comments"
Else
totext({table.datefield})

Where I run into an issue is getting the date formatted in such a way as we are used to seeing it.  We prefer to use the format

DD-MMM-YY  (i.e. 18-FEB-14)

How can I accomplish this formatting with the above formula in place or is there a better way to handle the blank date information. 

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 18 Feb 2014 at 4:38am
totext({table.field}, "dd-MMM-yy")
IP IP Logged
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Posted: 18 Feb 2014 at 6:10am
Many Many thanks 
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.