Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Formatting time in a cell (Read 455 times)
gumoid
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Apr 10th, 2025
Formatting time in a cell
Apr 10th, 2025 at 8:30am
Print Post  
I need to use the cell time (timespan) format to display the total number of hours, even if the number of hours is 24 or more (for example, 100:21).
Something similar to Excel format [h]:mm. But it doesn't work here.

Thank you for your advice
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3371
Joined: Oct 19th, 2005
Re: Formatting time in a cell
Reply #1 - Apr 10th, 2025 at 10:05am
Print Post  
It doesn't seem we support that at this time. We'll try to implement [h] format strings for upcoming release.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
gumoid
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Apr 10th, 2025
Re: Formatting time in a cell
Reply #2 - Apr 10th, 2025 at 11:40am
Print Post  
Thank you for the information

nice day
gumoid
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3371
Joined: Oct 19th, 2005
Re: Formatting time in a cell
Reply #3 - Apr 11th, 2025 at 5:36am
Print Post  
This build adds support for total hours / minutes / seconds format strings:

https://www.nuget.org/packages/MindFusion.Spreadsheet/1.8.0-beta2

[h], [m] and [s] respectively:

Code
Select All
sheet.Cells["A1"].Data = "12:45:00";
sheet.Cells["A2"].Data = "15:30:00";
sheet.Cells["A3"].Data = "=A1+A2";
sheet.Cells["A3"].Style.Format = "[h]:mm"; 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint