Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with formatting result of DateDiff 1

Status
Not open for further replies.

moopenguin32

Technical User
Dec 23, 2008
20
0
0
US
I am using Crystal Reports XI connecting to an Oracle database that houses help desk information. I am using DateDiff to calculate the difference in days between when a help desk ticket is opened and closed. Here is the formula I am using:

Code:
DateDiff( "d",{HPD_Help_Desk.Reported Date},{HPD_Help_Desk.Last Resolved Date})

Then, I take this value to make a graph. However, in the graph, it shows the days open as 0.00, 1.00, 2.00 and so forth. I would like to show whole numbers such as 0, 1, 2, etc.

How can I format the numbers so they appear without decimals? Thanks in advance for your assistance.

"Remember, today is the tomorrow you worried about yesterday." - Dale Carnegie
 
Are you referring to the axis value or the data value?

For data labels:

Select one of the values and right click -> Format data label -> Select the 'Number tab' -> format decimal places etc.

For axis labels:
Select one of the axis vales and right click -> Format axis label -> Number -> amend decimal places to 0 as with above.

(Ps: This all sounds a lot more complicated than it actually is ;))

'J


CR8.5 / CRXI - Discovering the impossible
 
I am referring to the axis labels.

When I right-click on the labels that are on the x-axis (the ones that are being generated by the formula), there is only a "Font" tab. However, when I right-click on the labels that are on the y-axis, I see both a "Font" and "Number" tab.

I'm guessing this has something to do with the formula.

"Remember, today is the tomorrow you worried about yesterday." - Dale Carnegie
 
You could change your formula to:

totext(DateDiff( "d",{HPD_Help_Desk.Reported Date},{HPD_Help_Desk.Last Resolved Date}),"00")

...where you add as many zeros as places in the highest number. This is necessary to sort correctly.

-LB
 
Thank you once again. This worked like a charm.

"Remember, today is the tomorrow you worried about yesterday." - Dale Carnegie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top