|
Hi guys,
ok so I'm sitting with an issue. This is what I have:
Name | Delay Duration
Test1 | 4891:41
Test2 | 250:29
Test3 | 152:00
So the "Delay Duration" is a seconds field from SQL. Then I use the following to dump it into a "Time" field:
WhilePrintingRecords;
NumberVar TotalSec := {FETCHMMDELAYSMOBILEEQUIPMENT.DelayDuration} ;
NumberVar Hours := Truncate ( TotalSec / 3600);
NumberVar Minutes := Truncate (Remainder ( TotalSec,3600) / 60);
Totext ( Hours, '00') + ':'+
Totext ( Minutes,'00')
Problem is when exporting to Excel this field is seen as text. In excel you can change the format to "h:mm" then use it in a formula. I need to set the format to "h:mm" in crystal report so that Excel can use this.
Problem is that so far the formatting in Crystal Reports resets the value if I take it to time. It doesn't show 4891:41 as hours:minutes. It only allows up to 23:59 to be shown then it resets to 00:00 and restarts the hh:mm. Is there a way to let crystal sees this as a time field but keeps the value and show more than a 24 hour clock?
|