Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 440
  • Last Modified:

Formatting a crosstab summary from seconds to MM:SS

I have a crosstab set up based on a formula that determines the number of seconds between two dates, and then finds the median. It works correctly using the seconds value.

Cross-Tab Summarized Fields:
Median of @DateDiffSeconds

However, I would like it to display in MM:SS format.

If I use the formula to create a CTime, Median isn't an allowed summary type.

I can't find a way to change the way it's displayed based on the calculations. (Like Group names, having a formula for calculating as well as a seperate one for displaying.)
0
jb25
Asked:
jb25
1 Solution
 
dougvargaCommented:
Right click on your summary field in the cross tab.
Select Format Field.
Click on the formula icon next to Display String on the Common Tab.

Insert the following Formula:

numbervar hours := Truncate(CurrentFieldValue/60);

numbervar seconds := remainder(CurrentFieldValue, 60);

cstr(hours,0)+":"+cstr(seconds,"00",0)
0
 
jb25Author Commented:
Worked perfectly. I didn't realize that there was an option to change the display string under Format Field.

Thank you.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now