Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Difference in dates and text Post Reply Post New Topic
Author Message
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Topic: Difference in dates and text
     Posted: 05 Jun 2014 at 2:18am
In a report I need to show the length of time in days that has passed.  if there is a null in my field I prefer to have a text note.  My formula reads

if
isnull({table.shipdate})
then
"Item Not Shipped"
else
totext(today - ({table.shipdate})

I would like to edit the way the number is displayed in my report by removing the decimals.  If the item was "shipped" today i would like it to be a 0 vs .44.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 05 Jun 2014 at 5:01am
totext(today-{table.shipdate}, 0, "")

i might have the 0 and "" reversed, check help. 0 is the number of decimal places to display and "" is the separator between whole and fraction units.

HTH
IP IP Logged
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Posted: 05 Jun 2014 at 7:40am
That did the trick. 

Thank you
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