Page 1 of 2

textformat TimeSpan (and totals of a TimeSpan)

Posted: Thu Mar 05, 2009 4:53 am
by J_S
Hi,

When I use a TimeSpan as datasource, the text formatting does not work. When I use the same formatting in a DateTime field, it works.

For example the format HH:mm. When I use the TimeSpan, I get 08:13:00, with the DateTime I get 08:13

Also getting the total value of several TimeSpan values does not work.

Can you please support text formatting and getting totals for the TimeSpan type?

Regards,

Joost

textformat TimeSpan (and totals of a TimeSpan)

Posted: Mon Mar 09, 2009 5:42 am
by Edward
Hi

The issue is confirmed. Now this feature is in our to do list. We will inform you about our progress in this topic.

Thank you.

textformat TimeSpan (and totals of a TimeSpan)

Posted: Tue Jun 30, 2009 7:01 pm
by chris.procter
I just ran in to the problem of summing TimeSpans, so I'd be interested in this issue also.
Thanks

Edit: As a workaround for now, I'm doing something like

Code: Select all

TimeSpan ts = new TimeSpan((long)Totals.Sum(DataEventItem,EventItems.TotalTime.Ticks));
e.Value = ts.Hours + ":" + ts.Minutes + ":" + ts.Seconds;
(with a bit of formatting left to go) in the GetValue event of my text box.

textformat TimeSpan (and totals of a TimeSpan)

Posted: Fri Jul 03, 2009 8:47 am
by Jan
Hello Joost,
When I use a TimeSpan as datasource, the text formatting does not work. When I use the same formatting in a DateTime field, it works.

For example the format HH:mm. When I use the TimeSpan, I get 08:13:00, with the DateTime I get 08:13
Problem fixed. Please check build from 6 July.
Also getting the total value of several TimeSpan values does not work.

Can you please support text formatting and getting totals for the TimeSpan type?
New total functions will be available in build from 6 July - SumTime, AvgTime, MinTime and MaxTime.

Thank you.

textformat TimeSpan (and totals of a TimeSpan)

Posted: Thu Aug 13, 2009 4:30 am
by J_S
I just downloaded the latest prerelease and unfortunately it still does not work...

I have a timespan value field in my report and set the text format with the predefined formats like HH:mm or H:mm, but I still can see the seconds.

Also the sum does not work. In my report I see HH:mm instead of the real value, also with the predefined text formats. When I use no formatting at all, the sum of my timespan values is zero all the time...



edit:
It turned out I had to remove the references and add them again. Now it works more or less. The formatting does not work in my sumtime field and does also not work when I add a condition to a field

edit 2:
It looks like the formatting does not work with negative values.

textformat TimeSpan (and totals of a TimeSpan)

Posted: Fri Aug 14, 2009 1:10 am
by Ivan
Hello,
J_S wrote:It turned out I had to remove the references and add them again. Now it works more or less. The formatting does not work in my sumtime field and does also not work when I add a condition to a field.
It looks like the formatting does not work with negative values.
Can you please send us a sample report with data, which reproduce the issue?

Thank you.


textformat TimeSpan (and totals of a TimeSpan)

Posted: Fri Aug 14, 2009 2:57 am
by J_S
I have added an attachment.

textformat TimeSpan (and totals of a TimeSpan)

Posted: Thu Aug 20, 2009 3:13 am
by J_S
Hello,

I would like to now if there is any progress or information about this problem.

Kind regards.

PS. Another nice default time formatting option would be the time as *.HH:mm, so the day value would only be shown if there is any or is larger than 0.

textformat TimeSpan (and totals of a TimeSpan)

Posted: Thu Aug 20, 2009 10:09 am
by Ivan
Hello,
J_S wrote:It looks like the formatting does not work with negative values.
We made some improvements in that direction.
Now your test application work correctly.
Patch will be available in next prerelease build from 24-Aug-2009.

Thank you.

textformat TimeSpan (and totals of a TimeSpan)

Posted: Tue May 17, 2011 5:34 pm
by jay@bplogix.com
I am still unable to format a TimeSpan object in reports (Reports.Web). Is this now possible? What do I set the format string to if I want to see days and hours of a TimeSpan?

Thanks