Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Years Shows with Decimal Post Reply Post New Topic
Author Message
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Topic: Years Shows with Decimal
    Posted: 21 Dec 2012 at 9:05am
I've written the following formula.
 
if month({ROTDividends.Vest Date})in [01,02,03]
then "Q1" & " - " & (Year ({ROTDividends.Vest Date}))
 
It current returns: Q1 - 2,011.00
I want it to return Q1 - 2011
 
Can anyone help me correct my code to format the year properly?
Thanks,
Steve
IP IP Logged
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Posted: 03 Jan 2013 at 4:35am
Bump - can anyone help me with this?
 
Thanks
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 04 Jan 2013 at 7:59am
Try changing the formula to this:
 
if month({ROTDividends.Vest Date})in [01,02,03]
then "Q1" & " - " & ToText(Year ({ROTDividends.Vest Date}), 0, "")
 
This will format the year as a string without the comma or decimal.
 
-Dell
IP IP Logged
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Posted: 09 Jan 2013 at 5:04am
Awesome - thanks for your help. I really appreciate it.
 
Steve
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.016 seconds.