Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: ?? Display day and year ? Post Reply Post New Topic
Author Message
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Topic: ?? Display day and year ?
    Posted: 12 Jul 2012 at 4:50am
Hi
 
I want to dislay a day and year only from a date?
 
example 1/6/2012 = 6/2012
 
Thanks
Joe
 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 12 Jul 2012 at 5:27am
Create a forumula like this:
totext(day({date_field}),0)+"/"+totext(year({date_field}),0)
or you could convert the date field to text, and use the right function to strip off the month.   But it is much more complicated.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 12 Jul 2012 at 5:58am
I also worked on the other solution.
local stringvar datestr := totext({date_field},"MM/d/yyyy");
right(datestr, len(datestr)-instr(datestr,"/"))
IP IP Logged
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Posted: 12 Jul 2012 at 7:51am
thx so much for the help..
 
it works great...
 
FYI: I was doing a chart and the way the data was setup I needed to pull the day/year..
 
The chart was still sorting wrong but I chose "original" order and it sorted correctly. I assume it takes the sort via the sort on the report?
 
Also, if u know graphing, why when the values are 0 does it put the zeros in the middle giving you negative numbers?
I did a work around, just wordering if therewas a basic way I was missing to start the y at 0?
 
Thanks Again
 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 12 Jul 2012 at 10:10am
I have not done much graphing, so I will leave that question to other forum members.
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.030 seconds.