Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7813243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:47:01+00:00 2026-06-02T04:47:01+00:00

I have a list of several DateTimes. The DateTime is actually a String in

  • 0

I have a list of several DateTimes.
The DateTime is actually a String in HH:mm:ss format which i convert to DateTime.

From this list i retrieve the largest value (in minutes)

I calculate the total Minutes like the following:

//t is a DateTime
Double totalMin = TimeSpan.Parse(t.ToString()).TotalMinutes;

The largest value (in minutes) should be used as the “100%” value.
I already have calculated the largest value of the list.

Meaning all the other values (also in minutes) in the list will be calculate based on this value.
The other lower values have to scale on this max value in other words.

This will be used in a bar chart. So the largest value will take the most space followed by the lower values.

How exactly can i do this?

Thanks PeterP.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:47:03+00:00Added an answer on June 2, 2026 at 4:47 am

    You want to know how to calculate a percentage? Divide the current by the max and multiply it with 100. Then you can format the percentage like you want (like “20%”, “20.2%”, …).

    Double max = 200d;
    Double current = 23d;
    
    Double percent = current / max * 100;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a list view which has several rows of data and I
I have a list, each item of which has several things in it, including
I have several .list elements which all need a red color. Of these .list
I have to list several elements that are coming from a database source A
I have a Survey list which has several questions, one of those is people
I have a list in which I'd like to keep several head pointers. I've
This is the usual thing: you have a list of items with several attributes.
I have several list of colors (TColor) stored in arrays which i like sort
I have several objects that look like this: class PhoneNumber { String getNumber(); String
I am going brain dead on this; I have several List' defined, based on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.